List/Tuple bug or feature?

Peter Hansen peter at engcorp.com
Tue Sep 24 20:06:11 EDT 2002


sismex01 at hebmex.com wrote:
> It's one of python's features :-)
> 
> For when you wanna write a long string, SQL for example:
> 
> Query = "SELECT what, when, where, why "
>         "FROM t1, t2, t2 "
>         "WHERE t1.id = t2.id_t1 and t3.id_t2 = t2.id and t1.id_t2 = t3.id "
>         "AND t1.answer = 'OK'"
> 
> Kinda neat.

Especially when it actually works... you need the brackets or 
parentheses around the above strings or it will give you a
SyntaxError.

-Peter




More information about the Python-list mailing list