Here's another way that None is special.
===
>>> NoneType = type(None)
>>>
>>> class myNoneType(NoneType): pass
...
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: type 'NoneType' is not an acceptable base type
===

For more information see
https://stackoverflow.com/questions/10061752/which-classes-cannot-be-subclassed

Related are
https://stackoverflow.com/questions/2172189/why-i-cant-extend-bool-in-python/2172204#2172204
https://stackoverflow.com/questions/2825364/final-classes-in-python-3-x-something-guido-isnt-telling-me

-- 
Jonathan
_______________________________________________
Python-ideas mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to