Amaury Forgeot d'Arc <[email protected]> added the comment:
Of course, you get the same error with:
>>> f = open('foo', 'wb')
>>> x, y = f
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
IOError: File not open for reading
i.e. the tuple assignment iterates over the file, and calls readline()
----------
nosy: +amaury.forgeotdarc
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue9940>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com