[New-bugs-announce] [issue7410] deepcopy of itertools.count resets the count
Robert Collins
report at bugs.python.org
Mon Nov 30 03:04:48 CET 2009
New submission from Robert Collins <robertc at robertcollins.net>:
>>> from copy import deepcopy
>>> from itertools import count
>>> c = count()
>>> c.next()
0
>>> deepcopy(c)
count(0)
>>> c.next()
1
>>> deepcopy(c)
count(0)
>>> c
count(2)
>>> deepcopy(c).next()
0
I don't see any reason why these shouldn't be deepcopyable (or picklable
for that reason - and that fails too)
----------
components: Library (Lib)
messages: 95830
nosy: rbcollins
severity: normal
status: open
title: deepcopy of itertools.count resets the count
versions: Python 2.7, Python 3.2
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7410>
_______________________________________
More information about the New-bugs-announce
mailing list