> In earlier versions, functions were special-cased by the instance > getattr code; the special case has been subsumed by looking for a > __get__ method. Yes, this means that a plain Python function object > is a descriptor! While we're on the topic -- Guid, how would you feel about the idea of giving built-in function objects the same instance- binding behaviour as interpreted functions? This would help Pyrex considerably, because currently I have to resort to a kludge to make Pyrex-defined functions work as methods. It mostly works, but it has some side effects, such as breaking the most common idiomatic usage of staticmethod() and classmethod(). If built-in functions were more like interpreted functions in this regard, all these problems would go away. Greg Ewing, Computer Science Dept, +--------------------------------------+ University of Canterbury, | A citizen of NewZealandCorp, a | Christchurch, New Zealand | wholly-owned subsidiary of USA Inc. | greg@cosc.canterbury.ac.nz +--------------------------------------+
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