copying generators error

Gerrit Holl gerrit at
Sun Mar 2 22:22:44 CET 2003


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/", line 95, in copy
    return _reconstruct(x, rv, 0)
  File "/usr/local/lib/python2.3/", line 336, in _reconstruct
    y = callable(*args)
  File "/usr/local/lib/python2.3/", line 84, in __newobj__
    return cls.__new__(cls, *args)
TypeError: object.__new__(listiterator) is not safe, use listiterator.__new__()

Is this a bug?


Asperger Syndroom - een persoonlijke benadering:
Het zijn tijden om je zelf met politiek te bemoeien:

More information about the Python-list mailing list