[Python-checkins] r75051 - in python/branches/py3k: Lib/test/test_range.py Objects/rangeobject.c
Jim Jewett
jimjjewett at gmail.com
Fri Sep 25 15:57:16 CEST 2009
On Fri, Sep 25, 2009 at 7:19 AM, Nick Coghlan <ncoghlan at gmail.com> wrote:
> Mark Dickinson wrote:
>> PyBool_CheckExact doesn't exist (as I was
>> slightly surprised to learn). PyBool_Check is
>> already an exact check (judging from the source).
> ... it also strikes me
> as a bit of an odd quirk in the API).
The quirk is that bool cannot be subclassed.
>>> class b(bool): pass
Traceback (most recent call last):
File "<pyshell#8>", line 1, in <module>
class b(bool): pass
TypeError: type 'bool' is not an acceptable base type
More information about the Python-checkins
mailing list