[New-bugs-announce] [issue43078] Equality Errors when Unpickling and Pickling a Dictionary with a nan

Rohan Prasad report at bugs.python.org
Sat Jan 30 12:36:12 EST 2021


New submission from Rohan Prasad <rohandev.1200 at gmail.com>:

Hi,

I'm having a weird issue with floats in dictionaries and equality comparison (see attached screenshot for an example). When I create two dictionaries with a nan value they pass an equivalence test. However, if I pickle and unpickle one of the dictionaries they become no longer equivalent. I would expect that the behavior would be the same irrespective of whether they are pickled/unpickled. Is there something else I should be doing here or is there a way to easily resolve this (short of writing custom ways to compare equality)?

----------
files: numpy-nan-dict-error.png
messages: 385990
nosy: rp4fx12
priority: normal
severity: normal
status: open
title: Equality Errors when Unpickling and Pickling a Dictionary with a nan
type: behavior
versions: Python 3.7, Python 3.8
Added file: https://bugs.python.org/file49781/numpy-nan-dict-error.png

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43078>
_______________________________________


More information about the New-bugs-announce mailing list