On Thu, Mar 28, 2013 at 1:24 PM, Νίκος Γκρ33κ <nikos.gr...@gmail.com> wrote: > I think i have figured this out: > > cur.execute( '''SELECT hits FROM counters WHERE url = %s''') , (page,) > > is a tuple of two objects. The first is the result of > cur.execute( '''SELECT hits FROM counters WHERE url = %s''') > and the second is > (page,) > > > cur.execute( '''SELECT hits FROM counters WHERE url = %s''' , (page,) ) > is the result of the execute method of the cur object called with two > arguments. > > > >>>> int('10010110101', 2) > 1205 >>>> int('10010110101'), 2 > (10010110101, 2) >>>> > > Is this correct?
Ah, crossed in the post. Yes, this is correct, as you can confirm with the operator precedence table that I posted above. (Experienced programmers would have the universal precedences in their heads, but the same applies.) ChrisA -- http://mail.python.org/mailman/listinfo/python-list