Eric V. Smith <e...@trueblade.com> added the comment:
To be clear, by "file", you mean python source file, or I guess .pyc file if only that exists. I can't say I've given it much thought. What about built-in modules? Or frozen modules? I'm not sure this is a great idea. In general, we've frowned on code that uses sys._getframe, and in particular that looks arbitrarily up the stack. At the very least, you should find out if other python implementations can use this function. I suggest bringing this up on the python-ideas mailing list. ---------- nosy: +eric.smith _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue44979> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com