Changes by Terry J. Reedy tjre...@udel.edu:
--
assignee: docs@python - terry.reedy
nosy: +terry.reedy
stage: - commit review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18676
___
Roundup Robot added the comment:
New changeset 737b53ec5d1a by Terry Jan Reedy in branch '2.7':
Issue #18676: Change 'positive' to 'non-negative' in queue.py put and get
http://hg.python.org/cpython/rev/737b53ec5d1a
New changeset 2122d56d6bc5 by Terry Jan Reedy in branch '3.3':
Issue #18676:
Terry J. Reedy added the comment:
Zhongyue, we merge 3.x patches forward (currently 3.3 to 3.4) so only one patch
is usually needed unless the differences are non-trivial. It is easier if
different version patches are tagged with the version in the filename.('-27',
for instance.
If you think
R. David Murray added the comment:
This is more of a documentation issue than a code issue. To be mathematically
precise, the text and error message should read a non-negative value.
Alternatively the text and error could be changed to report that timeout may
not be negative, which would
Zhongyue Luo added the comment:
David,
How about like below?
elif timeout sys.float_info.epsilon:
raise ValueError('timeout' must be a positive number)
The docstring has been there for quite a while and IMHO it just doesn't make
sense passing 0.0 as a timeout value.
--
Richard Oudkerk added the comment:
IMHO it just doesn't make sense passing 0.0 as a timeout value.
I have written lots of code that looks like
timeout = max(deadline - time.time(), 0)
some_function(..., timeout=timeout)
This makes perfect sense. Working code should not be broken --
R. David Murray added the comment:
Exactly. 0 means Don't wait, just raise an error immediately if the queue is
empty/full.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18676
___
Changes by Zhongyue Luo zhongyue@gmail.com:
--
keywords: +patch
Added file: http://bugs.python.org/file31187/queue_timeout_docstring.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18676
Changes by Zhongyue Luo zhongyue@gmail.com:
Added file: http://bugs.python.org/file31188/queue_timeout_docstring.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18676
___
Changes by Zhongyue Luo zhongyue@gmail.com:
Added file: http://bugs.python.org/file31189/queue_timeout_docstring.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18676
___
10 matches
Mail list logo