List/Tuple bug or feature?

Mahesh Padmanabhan news at nospam.eml.cc
Tue Sep 24 18:06:10 EDT 2002


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.



More information about the Python-list mailing list