List/Tuple bug or feature?

sismex01 at hebmex.com sismex01 at hebmex.com
Tue Sep 24 18:12:33 EDT 2002


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.

-gus

> -----Original Message-----
> From: Mahesh Padmanabhan [mailto:news at nospam.eml.cc]
> Sent: Tuesday, September 24, 2002 5:06 PM
> To: python-list at python.org
> Subject: List/Tuple bug or feature?
> 
> 
> 
> Hi,
> 
> I spent a lot of frustrating hours tracking this down and I am
> confused as to why I see this behavior.
> 
> >>> x = ('a' 'b')
> >>> x
> 'ab'
> 
> >>> x = ['a' 'b']
> >>> x
> ['ab']
> 
> As you might have guessed, I missed a comma between two elements in
> a fairly large list.
> 
> If this is a concatenation feature, how can I prevent something like
> this happening in the future ?
> 
> This is with Python 2.1.3 on Debian Linux.
> 
> Python 2.1.3 (#1, Sep  7 2002, 15:29:56) 
> [GCC 2.95.4 20011002 (Debian prerelease)] on linux2
> Type "copyright", "credits" or "license" for more information.
> 
> TIA,
> 
> -- 
> Mahesh Padmanabhan
> 
> -------
> 
> Replace nospam with prana to email me.
> -- 
> http://mail.python.org/mailman/listinfo/python-list
> 

Advertencia: 
La informacion contenida en este mensaje es confidencial y restringida y
esta destinada unicamente para el uso de la persona arriba indicada, Esta
comunicacion representa la opinion personal del remitente y no refleja
necesariamente la opinion de la Compañia. Se le notifica que esta
estrictamente prohibida cualquier difusion, distribucion o copia de este
mensaje. Si ha recibido esta comunicacion o copia de este mensaje por error,
o si hay problemas en la transmision, favor de comunicarse con el remitente.


Todo el correo electrónico enviado para o desde esta dirección será
procesado por el sistema de correo corporativo de HEB. Tal correo
electrónico esta sujeto a ser almacenado y puede ser revisado por alguien
ajeno al recipiente autorizado con el propósito de monitorear que se cumplan
las normas de seguridad de la empresa.




More information about the Python-list mailing list