restriction

Why I can't extend bool in Python?

Why I can't extend bool in Python? Question: >>> class BOOL(bool): … print “why?” … why? Traceback (most recent call last): File “<stdin>”, line 1, in <module> TypeError: Error when calling the metaclass bases type ‘bool’ is not an acceptable base type I thought Python trusted the programmer. Asked By: Juanjo Conti || Source Answers: …

Total answers: 5