Showing the method's class in expection's traceback

Diez B. Roggisch deets at nospam.web.de
Mon May 19 05:58:23 EDT 2008


> 
> That by itself is not enough, the method could be inherited; one should
> walk the base classes in the MRO to find the right one. And deal with
> classmethods and staticmethods. And decorators that don't preserve meta
> information... Hmmm, I think it isn't so trivial as it seems.

You might even have an instance-unique method. But I think the OP is
satisfied with a 90%-solution.

Diez



More information about the Python-list mailing list