Nick Coghlan added the comment:

Catching the erroneous registration rather than silently ignoring it sounds 
like the right thing to do here to me as well.

I'm actually surprised that code isn't already throwing an exception later on, 
as "isinstance" itself does fail with non-types:

>>> from enum import Enum
>>> 
>>> IS = Enum("IS", "a, b")
>>> isinstance(IS.a, IS)
True
>>> isinstance(IS.a, IS.a)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: isinstance() arg 2 must be a type or tuple of types

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27984>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to