[Python-3000] Useless methods in Queue module
Leif Walsh
adlaiff6 at gmail.com
Mon Jan 14 20:16:20 CET 2008
On Jan 14, 2008 2:15 PM, Leif Walsh <adlaiff6 at gmail.com> wrote:
> On Jan 14, 2008 1:21 PM, Guido van Rossum <guido at python.org> wrote:
> > How about dropping empty() and full(), but keeping qsize()? empty() is
> > trivially rephrased as qsize()==0; I haven't heard any use cases for
> > full().
>
> I think the point is that, with multiple threads, those methods are
> not guaranteed to be correct, whereas trapping the exceptions
> apparently are, and therefore, leaving those methods in is confusing
> to new programmers who might assume they work and use them without a
> second thought.
Err, what I mean is, qsize()==0 really isn't a satisfactory replacement.
More information about the Python-3000
mailing list