Guido van Rossum <gu...@python.org> added the comment:

I'm still torn about the need for a __file__ attribute. Assuming it's more 
likely that people write code that *reads* stdlib source for some reason (maybe 
printing more context for error messages) than *writing* it (which would be 
truly strange), the amount of 3rd party code that might break due to the lack 
of __file__ can be expected to be larger than the amount of code (or number of 
users) that would be confused to having a __file__ pointing to a file that 
isn't actually read by the interpreter.

Okay, so I'm no longer torn. We should set __file__ for frozen modules based on 
the pre-computed location of the stdlib.

----------

_______________________________________
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