On Sat, 26 Feb 2005 16:50:06 +1000, Nick Coghlan <[EMAIL PROTECTED]> wrote:
> Moving a discussion from the PEP309 SF tracker (Patch #941881) to here, since
> it's gone beyond the initial PEP 309 concept (and the SF tracker is a lousy
> place to have a design discussion, anyway).
>
> The discussion
Paul Moore wrote:
Personally, I'd rather see partial as it stands, with its current
limitations, included. The alternative seems to be a potentially long
discussion, petering out without conclusion, and the whole thing
missing Python 2.5. (I know that's a long way off, but this already
happened wi
Hi,
It seems that in pystone, Proc1 the else branch is never reached.
Is this OK ??
Stelios
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-de
Paul Moore wrote:
> Personally, I'd rather see partial as it stands, with its current
> limitations, included. The alternative seems to be a potentially long
> discussion, petering out without conclusion, and the whole thing
> missing Python 2.5. (I know that's a long way off, but this already
> h
On Sat, 26 Feb 2005 13:20:46 -0500, Raymond Hettinger
<[EMAIL PROTECTED]> wrote:
> It is better to teach how to write a closure than to introduce a new
> construct that has its own problems and doesn't provide a real
> improvement over what we have now.
You make some good points. But this all remi
> But this all reminds me of the discussion
> over itemgetter/attrgetter. They also special-case particular uses of
> lambda, and in those cases the stated benefits were speed and
> (arguably) readability (I still dislike the names, personally).
I wouldn't use those as justification for partial().
> I did a quick experiment:
>
> >python -m timeit -s "from operator import itemgetter; l=range(8)"
> "itemgetter(1)(l)"
> 100 loops, best of 3: 0.548 usec per loop
>
> >python -m timeit -s "l=range(8)" "(lambda x:x[1])(l)"
> 100 loops, best of 3: 0.597 usec per loop
>
> That's far less o
On Sat, 26 Feb 2005 19:26:11 -0500, Raymond Hettinger <[EMAIL PROTECTED]> wrote:
> Are you sure about that? Contriving examples is easy, but download a
> few modules, scan them for use cases, and you may find, as I did, that
> partial() rarely applies. The argument order tends to be problematic.
Raymond Hettinger wrote:
* The PFA implementation proposed for Py2.4 ran slower than an
equivalent closure. If the latest implementation offers better
performance, then that may be a reason for having it around.
Not having done the timing, I'll defer to Paul and yourself here. However, one
of the
Nick Coghlan <[EMAIL PROTECTED]> wrote:
> Raymond Hettinger wrote:
> >* The instance method limitation never came up for me. However, it
> >bites to have a tool working in a way that doesn't match your mental
> >model. We have to document the limitations, keep them in mind while
> >programming, a
Dima Dorfman wrote:
Nick Coghlan <[EMAIL PROTECTED]> wrote:
Here, b is specialized at cut time, a is passed through the slot, and
c is passed through the implicit slots at the end. The only thing this
can't do is a generic right-"curry"--where we don't know how many
parameters come before the one w
11 matches
Mail list logo