[pypy-issue] [issue1418] Wrong immutable_unique_id() for complex objects
Amaury Forgeot d Arc
tracker at bugs.pypy.org
Mon Mar 11 10:33:34 CET 2013
New submission from Amaury Forgeot d Arc <amauryfa at gmail.com>:
First reported in https://bitbucket.org/pypy/compatibility/issue/2/pyyaml-310-test-failure-with-complex
Two distinct complex numbers can have the same id():
>>>> l = [-0.5j, 0.6-0.5j]
>>>> map(id, l)
(-36965545741457031161L, -36965545741457031161L)
This breaks memoization in the Yaml serializer, but also pickle!
>>>> pickle.loads(pickle.dumps(l))
[-0.5j, -0.5j]
----------
messages: 5435
nosy: amaury, pypy-issue
priority: critical
status: unread
title: Wrong immutable_unique_id() for complex objects
________________________________________
PyPy bug tracker <tracker at bugs.pypy.org>
<https://bugs.pypy.org/issue1418>
________________________________________
More information about the pypy-issue
mailing list