[issue32792] ChainMap should preserve order of underlying mappings

Serhiy Storchaka report at bugs.python.org
Sun Feb 11 03:43:07 EST 2018


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

On PR 5586 we discussed reverting the order of the iteration by mappings. There are reasons of doing this. But this adds a subtle behavior change. Currently list(ChainMap({1: int}, {1.0: float})) returns [1]. With reversed() it will return [1.0]. This change LGTM.

----------

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


More information about the Python-bugs-list mailing list