On 1 nov 2005, at 22.40, Guido van Rossum wrote:
>> [Greg Ewing]
>>> Maybe ** should be defined for functions so that you
>>> could do things like
>>>
>>>up3levels = dirname ** 3
>
> [Raymond Hettinger]
>> Hmm, using the function's own namespace is an interesting idea. It
>> might also be a go
> [Greg Ewing]
> > Maybe ** should be defined for functions so that you
> > could do things like
> >
> >up3levels = dirname ** 3
[Raymond Hettinger]
> Hmm, using the function's own namespace is an interesting idea. It
> might also be a good place to put other functionals:
>
>results = f.m
"Delaney, Timothy (Tim)" <[EMAIL PROTECTED]> wrote:
>
> Reinhold Birkenfeld wrote:
>
> > And we have solved the "map, filter and reduce are going away! Let's
> > all weep together" problem with one strike!
>
> I'm not sure if you're wildly enthusiastic, or very sarcastic.
>
> I'm not sure whic
Reinhold Birkenfeld wrote:
> And we have solved the "map, filter and reduce are going away! Let's
> all weep together" problem with one strike!
I'm not sure if you're wildly enthusiastic, or very sarcastic.
I'm not sure which I should be either ...
The thought does appeal to me - especially fun
Reinhold Birkenfeld wrote:
> Raymond Hettinger wrote:
>
>>[Martin Blais]
>>
I'm always--literally every time-- looking for a more functional
>>
>>form,
>>
something that would be like this:
# apply dirname() 3 times on its results, initializing with p
... = repapply(dirn
On 11/1/05, Reinhold Birkenfeld <[EMAIL PROTECTED]> wrote:
> > Hmm, using the function's own namespace is an interesting idea. It
> > might also be a good place to put other functionals:
> >
> >results = f.map(data)
> >newf = f.partial(somearg)
>
> And we have solved the "map, filter and r
Raymond Hettinger wrote:
> [Martin Blais]
>> > I'm always--literally every time-- looking for a more functional
> form,
>> > something that would be like this:
>> >
>> ># apply dirname() 3 times on its results, initializing with p
>> >... = repapply(dirname, 3, p)
>
> [Greg Ewing]
>> Maybe
[Martin Blais]
> > I'm always--literally every time-- looking for a more functional
form,
> > something that would be like this:
> >
> ># apply dirname() 3 times on its results, initializing with p
> >... = repapply(dirname, 3, p)
[Greg Ewing]
> Maybe ** should be defined for functions so
Martin Blais wrote:
> I'm always--literally every time-- looking for a more functional form,
> something that would be like this:
>
># apply dirname() 3 times on its results, initializing with p
>... = repapply(dirname, 3, p)
Maybe ** should be defined for functions so that you
could do
On 10/31/05, Martin Blais <[EMAIL PROTECTED]> wrote:
> I'm always--literally every time-- looking for a more functional form,
> something that would be like this:
>
># apply dirname() 3 times on its results, initializing with p
>... = repapply(dirname, 3, p)
[...]
> Just wondering, does an
On Mon, Oct 31, 2005, Martin Blais wrote:
>
> There is a way to hack something like that with reduce, but it's not
> pretty--it involves creating a temporary list and a lambda function:
>
> ... = reduce(lambda x, y: dirname(x), [p] + [None] * 3)
>
> Just wondering, does anybody know how to do t
Hi
I find myself occasionally doing this:
... = dirname(dirname(dirname(p)))
I'm always--literally every time-- looking for a more functional form,
something that would be like this:
# apply dirname() 3 times on its results, initializing with p
... = repapply(dirname, 3, p)
There is a
12 matches
Mail list logo