[Python-Dev] PEP 318: Properties (original) (raw)
Guido van Rossum guido at python.org
Sun Apr 4 20:22:44 EDT 2004
- Previous message: [Python-Dev] PEP 318: Properties
- Next message: [Python-Dev] PEP 318: Properties
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Then it makes sense to put "x = 42" after the three property definitions (before the end of the class definition). Would that work?
No, for deep reasons that have to do with the implementation of descriptors. This has nothing to do with decorators and not a lot with properties -- it's the same as
class C: def x(self): return self.__x x = 42
today.
--Guido van Rossum (home page: http://www.python.org/~guido/)
- Previous message: [Python-Dev] PEP 318: Properties
- Next message: [Python-Dev] PEP 318: Properties
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]