New submission from Robert Collins <robe...@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 <rep...@bugs.python.org>
<http://bugs.python.org/issue7410>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to