[Python-checkins] r75051 - in python/branches/py3k: Lib/test/test_range.py Objects/rangeobject.c
Mark Dickinson
dickinsm at gmail.com
Fri Sep 25 07:55:11 CEST 2009
On Thu, Sep 24, 2009 at 9:45 PM, Nick Coghlan <ncoghlan at gmail.com> wrote:
> mark.dickinson wrote:
>> range_contains(rangeobject *r, PyObject *ob) {
>> - if (PyLong_Check(ob)) {
>> + if (PyLong_CheckExact(ob) || PyBool_Check(ob)) {
>
> Didn't you just create the same problem for yourself with subclasses of
> bool?
I don't think so. PyBool_CheckExact doesn't exist (as I was
slightly surprised to learn). PyBool_Check is already
an exact check (judging from the source).
Mark
More information about the Python-checkins
mailing list