[issue9425] Rewrite import machinery to work with unicode paths

Antoine Pitrou report at bugs.python.org
Wed Aug 11 12:10:08 CEST 2010


Antoine Pitrou <pitrou at free.fr> added the comment:

Actually, I'm not sure there's much point since the "name" attribute is currently read-only:

>>> f = open(1, "wb")
>>> f.name = "foo"
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: attribute 'name' of '_io.BufferedWriter' objects is not writable
>>> 
>>> g = open(1, "w")
>>> g.name = "bar"
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: attribute 'name' of '_io.TextIOWrapper' objects is not writable

----------

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


More information about the Python-bugs-list mailing list