[Python-Dev] PEP 318 restrictions on elements (original) (raw)
[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
- Previous message: [Python-Dev] PEP 318 - generality of list; restrictions on elements
- Next message: [Python-Dev] PEP 318 - generality of list; restrictions on elements
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
-- Fred L. Drake, Jr. PythonLabs at Zope Corporation
- Previous message: [Python-Dev] PEP 318 - generality of list; restrictions on elements
- Next message: [Python-Dev] PEP 318 - generality of list; restrictions on elements
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]