On 2005 Jan 12, at 16:44, Thomas Heller wrote: ... >> conform = getattr(type(obj), '__conform__', None) ... > I'm confused. Do you mean that > > getattr(obj, "somemethod")(...) > > does something different than > > obj.somemethod(...) > > with new style class instances? Doesn't getattr search the __dict__'s > along the __mro__ list? Yes, but getattr(obj, ... ALSO searches obj itself, which is what we're trying to avoid here. getattr(type(obj), ... OTOH has a DIFFERENT problem -- it ALSO searches type(type(obj)), the metaclass, which we DON'T want. Alex
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