Amaury Forgeot d'Arc <amaur...@gmail.com> added the comment: trace.py has a hack for this: it uses gc.get_referrers() to crawl back from the code object to the encloding class. I would not trust this gc.get_referrers() though; it is probably slow, and there are even some crashers related to this function; I would not like it to be called on every traceback.
---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue11007> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com