[New-bugs-announce] [issue24806] Inheriting from NoneType does not fail consistently
Brecht Machiels
report at bugs.python.org
Thu Aug 6 09:00:11 CEST 2015
New submission from Brecht Machiels:
These both raise an exception:
class Null(type(None)): pass
class Null(object, type(None)): pass
The following does not:
class Object(object): pass
class Null(Object, type(None)): pass
This should also raise a TypeError.
Also, the result is not what I expected, as "bool(Null())" yields True.
----------
components: Interpreter Core
messages: 248112
nosy: brechtm
priority: normal
severity: normal
status: open
title: Inheriting from NoneType does not fail consistently
type: behavior
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue24806>
_______________________________________
More information about the New-bugs-announce
mailing list