[issue7162] 2to3 does not convert __builtins__.file

Ryan Coyner report at bugs.python.org
Sun Mar 7 22:24:34 CET 2010


Ryan Coyner <rcoyner at gmail.com> added the comment:

I thought the whole point was that file[1] was removed in 3.0[2]? Or, are you saying that if somebody overloaded file with def file(...)? If that is the case would it be reasonable to check like this?

>>> file in list(__builtins__.__dict__.values())
True
>>> def file():
...     pass
... 
>>> file in list(__builtins__.__dict__.values())
False
>>> 


[1] - http://docs.python.org/library/functions.html?highlight=file#file
[2] - http://docs.python.org/3.1/whatsnew/3.0.html#builtins

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7162>
_______________________________________


More information about the Python-bugs-list mailing list