Re: [pypy-dev] Difference to CPython (Maybe a bug in PyPy)

2018-10-12 Thread Armin Rigo
Hi, On Fri, 12 Oct 2018 at 17:00, Wiener, Markus wrote: > i found (maybe) a bug in PyPy. Your code is relying on an explicitly undefined behavior described for dicts in https://docs.python.org/3/library/stdtypes.html#dictionary-view-objects . The same applies to sets, although I'm not sure it's

[pypy-dev] Difference to CPython (Maybe a bug in PyPy)

2018-10-12 Thread Wiener, Markus
Hello, i found (maybe) a bug in PyPy. Try: > python python_vs_pypy.py and > pypy python_vs_pypy.py Regards, Markus Wiener """ use "python python_vs_pypy.py" and "pypy python_vs_pypy.py" """ n = 3 x = [] a = set(range(n)) def without_copy(i): if i == n: print(x) else: