A strange and annoying restriction, possibly a bug. A glance by a more experienced would be nice.

Elmo Mäntynen elmo13 at jippii.fi
Sat Jun 25 18:04:48 EDT 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

This is the case:

>>> n=(100,) tuple(*n)

Traceback (most recent call last):
  File "<pyshell#31>", line 1, in -toplevel-
    tuple(*n)
TypeError: iteration over non-sequence

To be sure I searched for ways to check if something is a sequence:

>>> n.__iter__().next()
100
>>> n.__getitem__(0)
100
>>> iter(n).next()
100

So as you see, as far as I can see, I gave a sequence, but the
Traceback says the opposite.
To me it seems like a bug, but I haven't filed any bugs before, so a
little help wouldn't be bad. I haven't checked if there is bug for
this, but I don't consider me finding a bug as obvious as this very
propable and something like this not to be fixed a long time ago.

I tried this with python 2.3 and 2.4.

If possible, could you send any anwsers to my own address also. Thanks
in advance.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCvdUActNFyQJObrsRAha+AJ9oEyL7sufkXCcsQxuMDvyxNqvGGACglBrF
le8HmOgXAyRqAY3DASArjM4=
=F9NR
-----END PGP SIGNATURE-----




More information about the Python-list mailing list