maybe a bug in python

flyaflya flyaflya at gmail.com
Sun Jun 5 12:33:48 EDT 2005


 >>> a = {1: ("a")}
 >>> a[1]
'a'
why not ('a')? when
 >>> a = {1: ((("a")))}
 >>> a[1]
'a'
the result is 'a' too,not ((("a"))).but when use["a"] or ("a","b"),the 
tuple is longer than 1, it's no problem.









-- 
[http://www.flyaflya.com/]



More information about the Python-list mailing list