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 zyluo
Recipients zyluo
Date 2013-08-07.13:52:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1375883528.55.0.275850242187.issue18676@psf.upfronthosting.co.za>
In-reply-to
Content
The docstring of methods put() and get() in Queue.py states

get(): If 'timeout' is a positive number, it blocks at most 'timeout' seconds and raises the Full exception if no free slot was available within that time.

put(): If 'timeout' is a positive number, it blocks at most 'timeout' seconds and raises the Empty exception if no item was available within that time.

Additionally the ValueError both methods raise is

 raise ValueError("'timeout' must be a positive number")

However the logic checks if 'timeout' is non-negative.

 elif timeout < 0:
     raise ValueError("'timeout' must be a positive number")

The logic should change as

 elif timeout <= 0:
     raise ValueError("'timeout' must be a positive number")
History
Date User Action Args
2013-08-07 13:52:08zyluosetrecipients: + zyluo
2013-08-07 13:52:08zyluosetmessageid: <1375883528.55.0.275850242187.issue18676@psf.upfronthosting.co.za>
2013-08-07 13:52:08zyluolinkissue18676 messages
2013-08-07 13:52:08zyluocreate