[Python-Dev] PEP 318 - generality of list;
restrictions on elements
Greg Ewing
greg at cosc.canterbury.ac.nz
Wed Mar 10 19:38:44 EST 2004
Aahz <aahz at pythoncraft.com>:
> Maybe I'm misunderstanding something. I thought that a property contains
> a get descriptor, which makes it a kind of callable.
A property is a descriptor which *contains* up to 3 callables (for
get, set, del), but descriptors themselves are not callable.
This is one reason we can't require the result of a decorator to be
callable. That would immediately rule out classmethod and
staticmethod, which return descriptors, not callables!
Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury, | A citizen of NewZealandCorp, a |
Christchurch, New Zealand | wholly-owned subsidiary of USA Inc. |
greg at cosc.canterbury.ac.nz +--------------------------------------+
More information about the Python-Dev
mailing list