[pypy-issue] Issue #2601: dictproxy should be recognised as a mapping, not a sequence (pypy/pypy)
Ronan Lamy
issues-reply at bitbucket.org
Thu Jul 6 13:26:22 EDT 2017
New issue 2601: dictproxy should be recognised as a mapping, not a sequence
https://bitbucket.org/pypy/pypy/issues/2601/dictproxy-should-be-recognised-as-a
Ronan Lamy:
On CPython:
```python
>>> type(int.__dict__)
<type 'dictproxy'>
>>> reversed(int.__dict__)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: argument to reversed() must be a sequence
```
On PyPy:
```python
>>>> type(int.__dict__)
<type 'dictproxy'>
>>>> reversed(int.__dict__)
<reversed object at 0x00007f2ada27ec08>
```
This was fixed for pypy3 in 78dee6627756, but backporting that commit isn't enough to fix pypy2.
More information about the pypy-issue
mailing list