Michael McCoy <michael.b.mc...@gmail.com> added the comment:

Serhiy, it sure is. I'll note that the issue is open. Moreover, reading through 
the history, Guido says it's a bug (msg160418), and there was agreement that it 
should be fixed. It's unclear why it was dropped.

Can you help me get this in? I'm not sure the correct protocol, since this is 
my first contrib.

Note that if this is not a bug, then there are probably bugs anywhere 
issubclass(...) is used to emulate exception handling. For example, unittest's 
self.assertRaises is inconsistent with the current behavior:

    from abc import ABC
    import unittest
    
    class TestExceptionABC(unittest.TestCase):
    
        def test_exception(self):
            class A(Exception, ABC):
                pass
            class B(Exception):
                pass
            A.register(B)
            with self.assertRaises(A, msg="Wrong exception raised"):
                raise B

Test passes in python3, but not in python2.

----------

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

Reply via email to