Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
ensure that each base is a new-style class before trying to get its MRO
Browse files Browse the repository at this point in the history
this check is technically only needed on Python 2
  • Loading branch information
embray committed Jun 28, 2018
1 parent fe444ef commit 43747a1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/sage/structure/dynamic_class.py
Expand Up @@ -407,7 +407,8 @@ def dynamic_class_internal(name, bases, cls=None, reduction=None, doccls=None, p
cls_bases = cls.__bases__
all_bases = set()
for base in bases:
all_bases.update(base.mro())
if isinstance(base, type):
all_bases.update(base.mro())
cls_bases = tuple(b for b in cls_bases if b not in all_bases)
bases = cls_bases + bases
else:
Expand Down

0 comments on commit 43747a1

Please sign in to comment.