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 <1582833633.75.0.455316226946.issue36144@roundup.psfhosted.org>
In-reply-to
Content
1.

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

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


2.

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.
History
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: <1582833633.75.0.455316226946.issue36144@roundup.psfhosted.org>
2020-02-27 20:00:33serhiy.storchakalinkissue36144 messages
2020-02-27 20:00:33serhiy.storchakacreate