This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pitrou
Recipients benjamin.peterson, pitrou, stutzbach
Date 2010-09-24.15:41:54
SpamBayes Score 2.8351898e-05
Marked as misclassified No
Message-id <1285342916.31.0.472051249531.issue9940@psf.upfronthosting.co.za>
In-reply-to
Content
Under 3.2 and 3.1:

>>> with open("foo", "wb") as x: pass
... 
>>> with open("foo", "wb") as (x, y): pass
... 
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
io.UnsupportedOperation: read

Similar oddities under 2.7:

>>> with open("foo", "wb") as (x, y): pass
... 
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
IOError: File not open for reading
>>> with io.open("foo", "wb") as (x, y): pass
... 
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
io.UnsupportedOperation: read
History
Date User Action Args
2010-09-24 15:41:56pitrousetrecipients: + pitrou, benjamin.peterson, stutzbach
2010-09-24 15:41:56pitrousetmessageid: <1285342916.31.0.472051249531.issue9940@psf.upfronthosting.co.za>
2010-09-24 15:41:54pitroulinkissue9940 messages
2010-09-24 15:41:54pitroucreate