copying generators error
Gerrit Holl
gerrit at nl.linux.org
Sun Mar 2 22:22:44 CET 2003
Hi,
when copying a listiterator, I get the following error:
22:21:29:3:gerrit at stopcontact:~/cvs/pygame/examples$ python
Python 2.3a2+ (#6, Mar 2 2003, 14:26:40)
[GCC 2.96 20000731 (Red Hat Linux 7.3 2.96-110)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
0 >>> import copy
1 >>> copy.copy(iter([]))
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/local/lib/python2.3/copy.py", line 95, in copy
return _reconstruct(x, rv, 0)
File "/usr/local/lib/python2.3/copy.py", line 336, in _reconstruct
y = callable(*args)
File "/usr/local/lib/python2.3/copy_reg.py", line 84, in __newobj__
return cls.__new__(cls, *args)
TypeError: object.__new__(listiterator) is not safe, use listiterator.__new__()
Is this a bug?
yours,
Gerrit.
--
Asperger Syndroom - een persoonlijke benadering:
http://people.nl.linux.org/~gerrit/
Het zijn tijden om je zelf met politiek te bemoeien:
http://www.sp.nl/
More information about the Python-list
mailing list