Andreas Kostyrka wrote: > * Jacob Abraham <[EMAIL PROTECTED]> [070419 10:08]: >> Hi Andreas Kostyrka, >> >> I am aware that property is a data descriptor. And I still don't see why >> if can't be uses as a decorator since decorators were created to fix the >> issue. >> >> getx= property(getx) > > Simple, they don't return function objects.
That is not a requirement, afaik. classmethod() and staticmethod() don't return function objects either and they are usable as decorators. @property def foo()... is equivalent to def foo()... foo = property(foo) which is the usual usage. To argue from authority :-) Ian Bicking agrees with me: http://blog.ianbicking.org/property-decorator.html Kent _______________________________________________ Tutor maillist - [email protected] http://mail.python.org/mailman/listinfo/tutor
