Message248113
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:03 | arigo | set | recipients:
+ arigo, brechtm |
2015-08-06 08:28:03 | arigo | set | messageid: <1438849683.46.0.0971934721507.issue24806@psf.upfronthosting.co.za> |
2015-08-06 08:28:03 | arigo | link | issue24806 messages |
2015-08-06 08:28:03 | arigo | create | |
|