On 2/24/2015 9:02 PM, Eric V. Smith wrote: > I'm not sure if it's correct, but deep in a library of mine I have: > > elif type(fn) == types.MethodType: > # bound method? > if fn.im_self is None: > # no 'self' > nskip = 0 > else: > # need to supply 'self' > nskip = 1 > > This is also a 2.x library. No idea if it works with 3.x. It will not. 3.x does not have 'unbound methods' in the above sense, and for bound methods, fn.im_self is now fn.__self__. -- Terry Jan Reedy
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