Issue #23572: Fixed functools.singledispatch on classes with falsy metaclasses.

Patch by Ethan Furman.
This commit is contained in:
Yury Selivanov 2015-08-18 14:20:00 -04:00
parent f5e0c41d6d
commit 77a8cd65be
3 changed files with 42 additions and 1 deletions

View file

@ -567,7 +567,7 @@ def _c3_merge(sequences):
break # reject the current head, it appears later
else:
break
if not candidate:
if candidate is None:
raise RuntimeError("Inconsistent hierarchy")
result.append(candidate)
# remove the chosen candidate