[Python-ideas] Non-boolean return from __contains__

Bruce Leban bruce at leapyear.org
Tue Jul 27 19:25:05 CEST 2010


The idea of LINQ is that you write the expression directly in the language
and it translates into a query expression. It's going to be operating on an
expression parse tree, right? Rather than trying to change
the allowable expressions maybe the question is to figure out how to
translate what we have and find what we can't express with what we have (and
that's an orthogonal question and has nothing to do with __xxx__ functions).

On Tue, Jul 27, 2010 at 9:42 AM, Masklinn <masklinn at masklinn.net> wrote:
>
>  What about french quotes
>
> expr = «x + y * z»
>
>
Isn't there are already a syntax for this?

    expr = lambda: x + y * z

Maybe you want some conversion of that lambda into a different form:

    expr = @ast lambda: x + y + z


--- Bruce
http://www.vroospeak.com
http://google-gruyere.appspot.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20100727/1fe6a6bb/attachment.html>


More information about the Python-ideas mailing list