Accessors in Python (getters and setters)

Bruno Desthuilliers bdesth.quelquechose at free.quelquepart.fr
Wed Jul 19 15:34:59 EDT 2006


Tobias Brox a écrit :
> [Jason]
> 
>>Nothing like being forced to write getters and setters in C++/Java
>>before you feel like shooting your source code.  Please don't bring
>>this code-rage into Python.
> 
> 
> "Code generation" springs into my mind.  IMO, if the code needs to be
> generated, the language is not sufficiently advanced.
> 
OTOH, most decorators and metaclass hacking is somehow code generation - 
but hopefully not at the source code level...



More information about the Python-list mailing list