On 08:21 pm, ba...@python.org wrote:
On Feb 03, 2010, at 01:17 PM, Guido van Rossum wrote:
Can you clarify? In Python 3, __file__ always points to the source.
Clearly that is the way of the future. For 99.99% of uses of __file__,
if it suddenly never pointed to a .pyc file any more (even if one
existed) that would be just fine. So what's this talk of switching to
__source__?
Upon further reflection, I agree. __file__ also points to the source
in
Python 2.7. Do we need an attribute to point to the compiled bytecode
file?
What if, instead of trying to annotate the module object with this
assortment of metadata - metadata which depends on lots of things, and
can vary from interpreter to interpreter, and even from module to module
(depending on how it was loaded) - we just stuck with the __loader__
annotation, and encouraged/allowed/facilitated the use of the loader
object to learn all of this extra information?
Jean-Paul
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com