On Thu, Mar 11, 2004, Greg Ewing wrote: > 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! 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. As I noted, I'm not sure it's even possible to enforce that kind of restriction, but I think it's desirable to document. Guido has pronounced, so it's a dead issue, though. -- Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/ "Do not taunt happy fun for loops. Do not change lists you are looping over." --Remco Gerlich, comp.lang.python
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4