maybe a bug in python

flyaflya flyaflya at gmail.com
Sun Jun 5 18:33:48 CEST 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