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
_______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com