Message83174
| 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:42 | MLModel | set | recipients:
+ MLModel |
| 2009年03月05日 00:58:40 | MLModel | set | messageid: <1236214720.46.0.00736247638438.issue5418@psf.upfronthosting.co.za> |
| 2009年03月05日 00:58:39 | MLModel | link | issue5418 messages |
| 2009年03月05日 00:58:37 | MLModel | create |
|