Re: [Python-3000] [Python-Dev] Reminder: last alphas next Wednesday 07-May-2008

2008-05-01 Thread John Barham
> I think it would be great if Python were the first real adopter of this > convention... A convention without any adopters? Seems like a non sequitur... ___ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-

Re: [Python-3000] Removal of os.path.walk

2008-04-30 Thread John Barham
On Tue, Apr 29, 2008 at 8:42 PM, Guido van Rossum <[EMAIL PROTECTED]> wrote: > On Tue, Apr 29, 2008 at 8:10 PM, Tim Heaney <[EMAIL PROTECTED]> wrote: > > Speaking of this, is it too late to lobby for an iterator version of > > os.listdir? (Perhaps listdir would not be the best name. :) > > > >

Re: [Python-3000] Spooky behavior of dict.items() and friends

2008-04-01 Thread John Barham
David Pokorny wrote: > With all due respect, the policy you > describe---a more efficient implementation in the common > case---optimizes the code of people who don't think about this issue > at all. In other words it facilitates premature optimization. So automatically making the most common

Re: [Python-3000] Set literal

2008-01-24 Thread John Barham
Martin v. Löwis" wrote: > Are you implying that the search is faster for a tuple if the set is > small? That was my intuition but the measurements say otherwise. ;) Even for sets as small as two or three elements, searches in frozensets are faster than within tuples. See my tuple vs. frozenset

Re: [Python-3000] Set literal

2008-01-24 Thread John Barham
Guido wrote: > (I suspect for a 2-element set of ints or strings, translating "x in > {C1, C2}" into "x in (C1, C2)" might actually be a slight win since > probing a tuple must be much faster than probing a set; but that's a > detail.) A trivial but hopefully fairly representative benchmark: Act

Re: [Python-3000] Set literal

2008-01-24 Thread John Barham
On Jan 24, 2008 4:23 PM, Barry Warsaw wrote: > On Jan 24, 2008, at 7:12 PM, Raymond Hettinger wrote: > > >> Looking over the code base, frozensets are used rarely. > >> So I don't think this is warranted. > > > > There is no shortage for perfect use cases in the form: > > > > if urlext in {'html

Re: [Python-3000] Useless methods in Queue module

2008-01-11 Thread John Barham
On Jan 11, 2008 11:16 AM, Aahz <[EMAIL PROTECTED]> wrote: > On Fri, Jan 11, 2008, Raymond Hettinger wrote: > > > > I proposed to remove three methods from the queue module, qsize(), > > empty(), and full(). These are not reliable. The RightWay (tm) is to > > trap the Empty and Full exceptions or