[issue18676] Queue: document that zero is accepted as timeout value

2013-08-10 Thread Terry J. Reedy
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

[issue18676] Queue: document that zero is accepted as timeout value

2013-08-10 Thread Roundup Robot
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: Cha

[issue18676] Queue: document that zero is accepted as timeout value

2013-08-10 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- assignee: docs@python -> terry.reedy nosy: +terry.reedy stage: -> commit review ___ Python tracker ___ ___

[issue18676] Queue: document that zero is accepted as timeout value

2013-08-07 Thread Zhongyue Luo
Changes by Zhongyue Luo : Added file: http://bugs.python.org/file31189/queue_timeout_docstring.patch ___ Python tracker ___ ___ Python-bugs-li

[issue18676] Queue: document that zero is accepted as timeout value

2013-08-07 Thread Zhongyue Luo
Changes by Zhongyue Luo : Added file: http://bugs.python.org/file31188/queue_timeout_docstring.patch ___ Python tracker ___ ___ Python-bugs-li

[issue18676] Queue: document that zero is accepted as timeout value

2013-08-07 Thread Zhongyue Luo
Changes by Zhongyue Luo : -- keywords: +patch Added file: http://bugs.python.org/file31187/queue_timeout_docstring.patch ___ Python tracker ___ __

[issue18676] Queue: document that zero is accepted as timeout value

2013-08-07 Thread R. David Murray
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 ___

[issue18676] Queue: document that zero is accepted as timeout value

2013-08-07 Thread Richard Oudkerk
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 --

[issue18676] Queue: document that zero is accepted as timeout value

2013-08-07 Thread Zhongyue Luo
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. -- __

[issue18676] Queue: document that zero is accepted as timeout value

2013-08-07 Thread R. David Murray
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 p