> Hi guys. Greg, you were asking about making built-in functions act like > methods. This could break code, if it applies to all built-in > functions. In more than one Python version, I have stuck a built-in type > or function into a class, under the assumption that it would behave as a > 'staticmethod' now does. If all built-in functions start acting like > unbound methods, existing code will break. > > I'm not positive, but I think there's even code like this in the standard > library. > > I'm all for anything that makes Pyrex easier for Greg to maintain <wink>, > but perhaps there is a flag that could be used to request the behavior so > that existing code won't break? Good point! I suppose Greg could use something very similar to the standard built-in object type but with a __get__ method, or he could define a flag you have to set in the ml_flags before __get__ returns a bound function. --Guido van Rossum (home page: http://www.python.org/~guido/)
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