> >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/)
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