This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author arigo
Recipients arigo, brechtm
Date 2015-08-06.08:28:03
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
FWIW ``bool(Null())`` gives "correctly" the result False in CPython 3.5.

The problem in my opinion is that "!Py_TPFLAGS_BASETYPE" is checked only on the best base instead of on all bases.  It lets this kind of nonsense pass through.

In CPython 2.7 (but not 3.5) the following example also works (and is equally nonsense):

    class A(int): pass
    class Bogus(A, bool): pass

Although we're subclassing NoneType or bool, I did not manage to get a CPython crash from any of these examples.
Date User Action Args
2015-08-06 08:28:03arigosetrecipients: + arigo, brechtm
2015-08-06 08:28:03arigosetmessageid: <>
2015-08-06 08:28:03arigolinkissue24806 messages
2015-08-06 08:28:03arigocreate