A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2003-December/040663.html below:

[Python-Dev] Re: "groupby" iterator

[Python-Dev] Re: "groupby" iterator [Python-Dev] Re: "groupby" iteratorGuido van Rossum guido at python.org
Wed Dec 3 12:48:05 EST 2003
> >It is also somewhat weak in that it only addresses lambdas with one
> >argument, and only allows a single reference to that argument in the
> >resulting expression, and can't really be made to handle method calls
> >without more gross notational hacks -- even though it *can* be made to
> >handle arbitrary binary and unary operators.
> 
> A minor correction: the Voodoo approach handles fine method calls by
> defining a __call__ method in the Voodoo class; [...]
> 
> lambda x: x.startswith("text")
> This works fine as:
> Voodoo().startswith("text")

Hm.  But the whole point of Voodoo is that the resulting object has a
__call__ method that evaluates the expression for a given argument.
How do you do that?  (I suppose you can do it if you don't do
chaining, but I like the chaining.)

--Guido van Rossum (home page: http://www.python.org/~guido/)

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4