scoping weirdness

Alex Martelli aleax at aleax.it
Thu Aug 30 04:20:44 EDT 2001


"Tom Good" <Tom_Good1 at excite.com> wrote in message
news:ac677656.0108291503.4d211cd6 at posting.google.com...
> "Alex Martelli" <aleax at aleax.it> wrote in message
news:<9md62v01ne3 at enews1.newsguy.com>...
> > Currying-to-argumentlessness is a frequent enough need
> > (since Tk &c all want lots of argumentless callables)
> > that one may want to rename 'curry_to_argumentlessness'
> > to something more concise and put it in sitecustomize
> > or thereabouts.
>
> How about 'curry_all'?
>
> . . . 'curry_extra_spicy' comes to mind, too, but it is too many
characters :-)

Another frequent need, almost as frequent as currying all
arguments, is currying all but one, to get a one-argument
callable suitable for filter (or map -- it seems to me that
most of my map calls are with 1-arg callables).  Problem
with this is that there's no obvious syntax to specify
which one argument you want left "free" (uncurried) -- I
think that hardwiring it to the first one would cover a
majority of cases, but far from all.   Hmmmm....


Alex






More information about the Python-list mailing list