class level properties
Charles D Hixson
charleshixsn at earthlink.net
Sat Apr 12 15:36:51 EDT 2008
I'm trying to construct read-only variables at the class level. I've
been unsuccessful. Any suggestions?
Mixing @classmethod and @property doesn't appear to produce workable
code. Ditto for mixing @classmethod and __getattr__. (The property
approach compiles, but execution says that you can't execute properties.)
I've got a rather large number of variables, so I don't want to define
function accessors for each of them, and I *REALLY* don't want to have
to access them as functions rather than variables or properties.
More information about the Python-list
mailing list