Guido van Rossum wrote:
> On Wed, Feb 3, 2010 at 12:47 PM, Nick Coghlan <ncogh...@gmail.com> wrote:
>> On the issue of __file__, I'd suggesting not being too hasty in
>> deprecating that in favour of __source__. While I can see a lot of value
>> in having it point to the source file more often with a different
>> attribute that points to the cached file, I don't see a lot of gain to
>> compensate for the pain of changing the name of __file__ itself.
> 
> 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__?
> 

In Barry's rough notes that he added to the PEP he said he thought
__file__ had become too ambiguous and was going to suggest changing the
name to __source__. That struck me as an overreaction to a very mild
ambiguity (one that will only lessen with time if a new attribute is
added to point to the cached file that was actually executed).

Cheers,
Nick.

-- 
Nick Coghlan   |   ncogh...@gmail.com   |   Brisbane, Australia
---------------------------------------------------------------
_______________________________________________
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

Reply via email to