[New-bugs-announce] [issue46131] Add PyType_FastSubclass for float

mattip report at bugs.python.org
Sun Dec 19 05:38:20 EST 2021


New submission from mattip <matti.picus at gmail.com>:

The basic classes int, dict, list, tuple ... all have a fast path for Py_*Check(obj):

#define PyLong_Check(op) \
        PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LONG_SUBCLASS)


except for float. I propose to add a Py_TPFLAGS_FLOAT_SUBCLASS enum and use it to implement PyType_FastSubclass for float.

----------
components: C API
messages: 408890
nosy: mattip
priority: normal
severity: normal
status: open
title: Add PyType_FastSubclass for float

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue46131>
_______________________________________


More information about the New-bugs-announce mailing list