Op 24 jul. 2019 om 02:27 heeft Steven D'Aprano <[email protected]> het
volgende geschreven:
> But I can suggest at least one useful invariant. If a, b are two dicts:
>
> a.items() == b.items()
>
> ought to be equivalent to:
>
> (a.keys() == b.keys()) and (a.values() == b.values)
I don’t think this invariant holds unless comparison is order dependent. {1:2,
3:4} and {1:4, 3:2} have the same keys and values, but not the same items.
Ronald
_______________________________________________
Python-Dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at
https://mail.python.org/archives/list/[email protected]/message/TRAL2TDEXGOWBSISTU3CCL6BCAXK4CVN/