Facundo Batista <[EMAIL PROTECTED]> added the comment:

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...

----------
resolution:  -> wont fix
status: open -> closed

__________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2450>
__________________________________
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to