[Python-ideas] 'where' statement in Python?

Ian Bicking ianb at colorstudy.com
Tue Jul 20 22:09:02 CEST 2010


On Tue, Jul 20, 2010 at 2:20 PM, Sturla Molden <sturla at molden.no> wrote:

> Microsoft's LINQ is also similar to your suggestion.
>>
>>
>
> LINQ is just to compensate for lack of duck-typing in C# ;-) Also when used
> to Pythons list comprehensions, LINQ syntax feels like thinking backwards
> (which can be quite annoying) :-(
>

Well, LINQ has a bit more going on from what I can tell -- you can actually
get at the expressions and work with them.  This is something NumPy and
database abstraction layers both need, and they both currently use method
override hacks that have certain limitations (e.g., you capture ==, but you
can't capture "and").  If you work really hard you can decompile the
bytecodes (DejaVu did this for lambdas, but not generator expressions).  I
don't think  I've even seen a language proposal that actually tries to
tackle this though.

-- 
Ian Bicking  |  http://blog.ianbicking.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20100720/f808556b/attachment.html>


More information about the Python-ideas mailing list