Test None for an object that does not implement ==
Steven D'Aprano
steve+comp.lang.python at pearwood.info
Sun Dec 25 08:48:27 EST 2011
On Mon, 26 Dec 2011 00:35:46 +1100, Chris Angelico wrote:
[...]
>> TypeError: Error when calling the metaclass bases
>> type 'NoneType' is not an acceptable base type
>
> Yes; unfortunately quite a few Python built-in classes can't be
> subclassed.
I can't think of any other un-subclassable classes other than NoneType.
Which ones are you thinking of?
--
Steven
More information about the Python-list
mailing list