At 10:31 AM 3/10/04 -0500, Aahz wrote: >Maybe I'm misunderstanding something. I thought that a property contains >a get descriptor, which makes it a kind of callable. Read-only >properties contain a set descriptor that either does nothing or raises an >exception. That doesn't affect whether the property is classified as a >callable. Properties are not callable. Python 2.2.2 (#37, Oct 14 2002, 17:02:34) [MSC 32 bit (Intel)] on win32 Type "copyright", "credits" or "license" for more information. IDLE 0.8 -- press F1 for help >>> x=property() >>> x() Traceback (most recent call last): File "<pyshell#1>", line 1, in ? x() TypeError: 'property' object is not callable >>> callable(property()) 0 >>> callable(property(lambda x:None)) 0 >>>
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