Linq to Python

sturlamolden sturlamolden at
Thu Sep 25 11:18:14 CEST 2008

On 25 Sep, 10:08, Duncan Booth < at invalid.invalid> wrote:

> A lot of what LINQ does is already easy to do in Python, and most of the
> rest can probably be added fairly easily, but it does provide a consistent
> framework which may make it easier to do complex LINQ statements than
> complex list comprehensions.

Yes, that's the word, "consistent framework". I wonder what that
means? Do you mean Python syntax is inconsitent?

> BTW, a minor correction: LINQ statements are closer to generators, not list
> comprehensions. They don't actually evaluate their results until you
> iterate over them and you can re-used the same LINQ statement multiple
> times getting different results if the data has changed.

Python has generator expressions with the same syntax as list
comprehensions, except you use () instead of [].

More information about the Python-list mailing list