Marc-Andre Lemburg <m...@egenix.com> added the comment:

On 22.09.2021 20:47, Brett Cannon wrote:
> What about if there isn't a pre-computed location for __file__? I could 
> imagine a self-contained CPython build where there is no concept of a file 
> location on disk for anything using this.

This does work and is enough to make most code out there happy.

I use e.g. "<pyrun>/os.py" in PyRun. There is no os.py file to load,
but tracebacks and inspection tools work just fine with this.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue45020>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to