Re: [Python-Dev] copying of itertools iterators

2010-04-01 Thread Terry Reedy
On 4/1/2010 7:20 PM, Andrew Svetlov wrote: using of copy.copy for simple iterators is forbidden import copy copy.copy(iter([1, 2, 3])) Traceback (most recent call last): File "", line 1, in File "/home/andrew/projects/py3k/Lib/copy.py", line 96, in copy return _reconstruct(x, rv, 0)

Re: [Python-Dev] copying of itertools iterators

2010-04-01 Thread Raymond Hettinger
On Apr 1, 2010, at 4:20 PM, Andrew Svetlov wrote: > using of copy.copy for simple iterators is forbidden > import copy copy.copy(iter([1, 2, 3])) > Traceback (most recent call last): > File "", line 1, in > File "/home/andrew/projects/py3k/Lib/copy.py", line 96, in copy >return

[Python-Dev] copying of itertools iterators

2010-04-01 Thread Andrew Svetlov
using of copy.copy for simple iterators is forbidden >>> import copy >>> copy.copy(iter([1, 2, 3])) Traceback (most recent call last): File "", line 1, in File "/home/andrew/projects/py3k/Lib/copy.py", line 96, in copy return _reconstruct(x, rv, 0) File "/home/andrew/projects/py3k/Lib/c