scoping weirdness

Alex Martelli aleax at
Thu Aug 30 10:20:44 CEST 2001

"Tom Good" <Tom_Good1 at> wrote in message
news:ac677656.0108291503.4d211cd6 at
> "Alex Martelli" <aleax at> wrote in message
news:<9md62v01ne3 at>...
> > 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....


More information about the Python-list mailing list