[pypy-issue] Issue #2340: CPython / PyPy incompatibility issue in itertools.tee (pypy/pypy)

Evan Hubinger issues-reply at bitbucket.org
Thu Jul 7 00:01:11 EDT 2016


New issue 2340: CPython / PyPy incompatibility issue in itertools.tee
https://bitbucket.org/pypy/pypy/issues/2340/cpython-pypy-incompatibility-issue-in

Evan Hubinger:

In CPython 2 and 3, I can do
```
#!python
from itertools import tee
a, b = tee(iter([1, 2, 3]))
c = a.__copy__()
assert next(a) == 1 and next(b) == 1 and next(c) == 1
```
but in PyPy 2 and 3, this fails with
```
AttributeError: 'itertools._tee' object has no attribute '__copy__'
```
and `copy.copy` doesn't work either.




More information about the pypy-issue mailing list