Can't copy iterator object

Kerim Borchaev ( WarKiD ) warkid at storm.ru
Wed Oct 24 09:21:29 EDT 2001


Hello,

 I'm not supposed to do so? This could be useful...

Python 2.2b1 (#25, Oct 19 2001, 11:44:52) [MSC 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> i = iter([1,2,3])
>>> import copy
>>> copy.copy(i)
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "C:\Python22\lib\copy.py", line 84, in copy
    y = _reconstruct(x, reductor(), 0)
  File "C:\Python22\lib\copy_reg.py", line 56, in _reduce
    state = base(self)
TypeError: cannot create 'iterator' instances  

Best regards,
 Kerim                          mailto:warkid at storm.ru






More information about the Python-list mailing list