> > There are two ways to "bind" a built-in function to an object. > > > > One would be to do what happens for Python functions, which is in > > effect a currying: f.__get__(obj) yields a function g that when called > > as g(arg1, ...) calls f(obj, arg1, ...). > > That's the one I'm talking about. I forgot to explain that the problem > occurs when I'm creating a *Python* class object and populating it > with functions that are supposed to be methods. Currently I have to > manually wrap each function in an unbound method object before putting > it in the class's __dict__. If that happened automatically on access, > I would be able to create Python classes that behave more like the > real thing. OK, are you up for submitting a patch? --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