← Back to team overview

yade-dev team mailing list archive

Re: read-only attribute

 


Hi (Vaclav)
How to add a read-only attrubute to a class in order to I can read it from python?
See https://www.yade-dem.org/sphinx/prog.html#yade-class-base-doc-macro-family and attribute flags. You can specify that the normal will be (Attr::readonly|Attr::noSave). That way, it will be automatically accessible from python read-only, will be default-initialized properly, documented and not saved/loaded.

v.



References