[pypy-issue] Issue #2554: pypy dict() cannot create dict with dict has key with type int (pypy/pypy)

Jeffery Chenn issues-reply at bitbucket.org
Sat May 6 09:24:10 EDT 2017


New issue 2554: pypy dict() cannot create dict with dict has key with type int
https://bitbucket.org/pypy/pypy/issues/2554/pypy-dict-cannot-create-dict-with-dict-has

Jeffery Chenn:

In python 2,7, the following is worked.
>>> d={ 1:0, 0:1}
>>> x=dict(**d)
>>> x
{0: 1, 1: 0}

but for pypy. it is not worked.
>>>> d={ 1:0, 0:1}
>>>> x=dict(**d)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: keywords must be strings

It raise,  keywords must be strings




More information about the pypy-issue mailing list