On Mon, Dec 21, 2020 at 7:15 PM Paul Bryan <pbr...@anode.ca> wrote: > > Hmm, I see ints, floats and decimal.Decimal all produce the same hashes for > integer values, so they also suffer the same fate in sets and dicts. >
Yes, because they compare equal. (The hash is secondary to that.) Since 1 == 1.0, they must be coalesced in a set. ChrisA _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/D465HH4E4MBT75NXT2YGCKCXR5UOPRX6/ Code of Conduct: http://python.org/psf/codeofconduct/