This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients Aaron Hall, brandtbucher, gvanrossum, josh.r, mark.dickinson, rhettinger, scoder, serhiy.storchaka, slam, steve.dower, xtreak
Date 2020-02-27.20:00:33
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>

def __or__(self, other):
    return self.__class__(self.maps[0] | other, *self.maps[1:])

def __ror__(self, other):
    return other | dict(self)


def __or__(self, other):
    return self.__class__(other, *self.maps)

def __ror__(self, other):
    return self.__class__(*self.maps, other)

There are problems with both variants, so I think it may be better to not add this operator to ChainMap.
Date User Action Args
2020-02-27 20:00:34serhiy.storchakasetrecipients: + serhiy.storchaka, gvanrossum, rhettinger, mark.dickinson, scoder, steve.dower, josh.r, Aaron Hall, slam, xtreak, brandtbucher
2020-02-27 20:00:33serhiy.storchakasetmessageid: <>
2020-02-27 20:00:33serhiy.storchakalinkissue36144 messages
2020-02-27 20:00:33serhiy.storchakacreate