Linq to Python

Thomas G. Willis tom.willis at gmail.com
Tue Sep 23 20:45:55 CEST 2008


> But surely the idea behind it will eventually spread.  It's really
> just comprehensions generalized over XML and relational datasets, a
> noble goal.  Besides, it's main purpose for .NET was to bring
> functional programming to it.  Python already has that, somewhat...

it's really any object out of the box, i think the sql linq stuff is
more of a query compiler, IMO sqlalchemy does that.


query = select(user_cols,

    and_(table_relationship.c.accept_user_id==user.id,

    table_relationship.c.start_date==None

    ),

    from_obj=join(

    table_relationship,table_user,

    onclause=table_user.c.id==table_relationship.c.init_user_id

    ).outerjoin(table_profile)

    )

session.execute(query).fetchall()






XML? meh hopefully I would never need it. :)


C# is my day job, and when I got my hands on LINQ back in January my
initial thought was "Finally I have list comprehensions!!!! day job is
fun again"

For the most part, I think C# is catching up.



More information about the Python-list mailing list