maybe a bug in python
Tiago Stürmer Daitx
tdaitx at gmail.com
Sun Jun 5 13:14:23 EDT 2005
Just as everyone said, use ('a',) instead of ('a'). As Steve said there are
lots of documentation about it. Check the Library Reference at
http://www.python.org/doc/current/lib/typesseq.html#l2h-155 or to make
things more clear you could read the tuples section in the tutorial at
http://docs.python.org/tut/node7.html#SECTION007300000000000000000
my 2 cents
Regards,
Tiago S Daitx
On 6/5/05, flyaflya <flyaflya at gmail.com> wrote:
>
>
> >>> 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/]
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20050605/71a9eb88/attachment.html>
More information about the Python-list
mailing list