diff --git a/Lib/_collections_abc.py b/Lib/_collections_abc.py index 60b471317ce97c..44d930a0dd6616 100644 --- a/Lib/_collections_abc.py +++ b/Lib/_collections_abc.py @@ -106,11 +106,11 @@ async def _ag(): yield ### ONE-TRICK PONIES ### def _check_methods(C, *methods): - mro = C.__mro__ + mro_dicts = [B.__dict__ for B in C.__mro__] for method in methods: - for B in mro: - if method in B.__dict__: - if B.__dict__[method] is None: + for base_dict in mro_dicts: + if method in base_dict: + if base_dict[method] is None: return NotImplemented break else: