How to find out in which module an instance of a class is created?

Chris Rebert clp2 at
Sun Aug 16 12:30:54 CEST 2009

On Sun, Aug 16, 2009 at 6:25 AM, Johannes
Janssen<mail at> wrote:
> Gabriel Genellina schrieb:
>> The try/except around sys._getframe(1) is because that function is not
>> mandatory/available on all Python implementations (that's the case for
>> jython which doesn't provide it).
> Thanks, shouldn't such information be part of the python documentation of
> sys._getframe()
> (

The leading underscore kinda indirectly implies it, but yeah, it's
worth mentioning.
File a bug in the docs:


More information about the Python-list mailing list