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 facundobatista
Recipients facundobatista, jjlee
Date 2008-03-22.00:50:47
SpamBayes Score 0.3037986
Marked as misclassified No
Message-id <1206147048.53.0.414423635813.issue2450@psf.upfronthosting.co.za>
In-reply-to
Content
The argument timeout can not have the same semantics than data, see the
following cases:

- r = Request(url)
- urlopen(r, data="foo")
- # data is "foo"

- r = Request(url, data="foo")
- urlopen(r)
- # data is "foo"

- r = Request(url, data="foo")
- urlopen(r, data="bar")
- # data is "bar"

So, what would happen if you put timeout in Request:

- r = Request(url, timeout=3)
- urlopen(r, timeout=10)
- # here, the final timeout can be 10, no problem!

- r = Request(url, timeout=3)
- urlopen(r)
- # Oops!

In this last one, which the final timeout should be? None, as you passed
that to urlopen()? Or the original 3 from the Request?

With data you can do it, because None has no meaning, so only you
replace the Request value if actually you passed something in urlopen().
But for timeout, None *has* a meaning...
History
Date User Action Args
2008-03-22 00:50:48facundobatistasetspambayes_score: 0.303799 -> 0.3037986
recipients: + facundobatista, jjlee
2008-03-22 00:50:48facundobatistasetspambayes_score: 0.303799 -> 0.303799
messageid: <1206147048.53.0.414423635813.issue2450@psf.upfronthosting.co.za>
2008-03-22 00:50:47facundobatistalinkissue2450 messages
2008-03-22 00:50:47facundobatistacreate