while row = c.fetchone(): # syntax error???

Steven Adams adams_s at lab.eng.usyd.edu.au
Fri Aug 11 11:15:05 EDT 2000


I'm probably mistaken, but AFAIK python doesn't allow expressions in those
sorts of situations - its a statement based language. It's not like C/C++.

post a code snippet and someone cold probably come up with an alternative.

"Thomas Gagne" <tgagne at ix.netcom.com> wrote in message
news:399370FD.F883EFCE at ix.netcom.com...
> At the top of a while, the value of the function c.fetchone() is what I
want
> to evaluate, but I need to save the return value.  Whenever I try to code
this
> I get a syntax error--python doesn't seem to like the assignment in the
> conditional.  No amount of parens seem to make a difference.
>
> Help?
>





More information about the Python-list mailing list