homepage

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 MLModel
Recipients MLModel
Date 2009年03月05日.00:58:36
SpamBayes Score 0.0029254756
Marked as misclassified No
Message-id <1236214720.46.0.00736247638438.issue5418@psf.upfronthosting.co.za>
In-reply-to
Content
response = urllib.request.open(someURL)
 page = response.read()
close() be called on response after the read(), right? Experimentation 
shows that I can repeatedly read from response until I close it, getting 
back empty bytes objects.
Thinking that anything with a close() should support the with statement, 
I tried putting the code inside one but got
 AttributeError: 'addinfourl' object has no attribute '__exit__'
so I can see that it doesn't support with. It seems like it should.
History
Date User Action Args
2009年03月05日 00:58:42MLModelsetrecipients: + MLModel
2009年03月05日 00:58:40MLModelsetmessageid: <1236214720.46.0.00736247638438.issue5418@psf.upfronthosting.co.za>
2009年03月05日 00:58:39MLModellinkissue5418 messages
2009年03月05日 00:58:37MLModelcreate

AltStyle によって変換されたページ (->オリジナル) /