[sqlalchemy] Re: session.query object instead rowtuple

2009-09-28 Thread Alexandre Conrad
2009/9/28 Christian Démolis : > I need it to avoid  write this in my code > for e in s: >    print e[0] > > it's more difficult to read than >From a readability point of view, you could use unpacking in your loop: >>> for foo, bar in (("foo1", "bar1"), ("foo2", "bar2")): ... print "%s: %s" %

[sqlalchemy] Re: session.query object instead rowtuple

2009-09-28 Thread Christian Démolis
Ok thanks 2009/9/28 Mike Conley > The column is available as e.Namefile, no need to subscript with numbers. > > > > > On Mon, Sep 28, 2009 at 6:07 AM, Christian Démolis < > christiandemo...@gmail.com> wrote: > >> Hi everybody, >> >> I have a little problem with session.query. >> I try to optimiz

[sqlalchemy] Re: session.query object instead rowtuple

2009-09-28 Thread Mike Conley
The column is available as e.Namefile, no need to subscript with numbers. On Mon, Sep 28, 2009 at 6:07 AM, Christian Démolis < christiandemo...@gmail.com> wrote: > Hi everybody, > > I have a little problem with session.query. > I try to optimize my queries with only attributes that i need. > >