[Python-Dev] PEP 318 - generality of list;
restrictions on elements
Fred L. Drake, Jr.
fdrake at acm.org
Wed Mar 10 21:10:30 EST 2004
On Wednesday 10 March 2004 08:43 pm, Aahz wrote:
> That's why I said "kind of callable"; from the user's POV, they act like
> callables because you invoke them with call syntax, just like methods.
My first reaction to this was "Since when??!?"
If the only descriptors you're thinking about are things that return callables
from the __get__() method, it makes sense that you've made this mistake.
What needs to be considered though is that not all descriptors provide
callable results. Remember that "property" is a descriptor type; instances
of property are not normally callable.
Fred L. Drake, Jr. <fdrake at acm.org>
PythonLabs at Zope Corporation
More information about the Python-Dev