summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2003-02-18 16:36:28 (GMT)
committerGuido van Rossum <guido@python.org>2003-02-18 16:36:28 (GMT)
commit6921eca227ac2283ebcdf98e10aebea57bd5daf3 (patch)
treee705276019bc84a0d827dc0aa31b8dc1c2d4dcff /Misc
parent55dc26cbc764574bf1cca7e74bb511d623e1af7d (diff)
downloadcpython-6921eca227ac2283ebcdf98e10aebea57bd5daf3.zip
cpython-6921eca227ac2283ebcdf98e10aebea57bd5daf3.tar.gz
cpython-6921eca227ac2283ebcdf98e10aebea57bd5daf3.tar.bz2
Make PyNumber_Check() a bit more careful, since all sorts of things
now have tp_as_number. Check for nb_int or nb_float.
Diffstat (limited to 'Misc')
-rw-r--r--Misc/NEWS8
1 files changed, 8 insertions, 0 deletions
diff --git a/Misc/NEWS b/Misc/NEWS
index 5e0bad4..19752f0 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -89,6 +89,10 @@ Core and builtins
Extension modules
-----------------
+- operator.isNumberType() now checks that the object has a nb_int or
+ nb_float slot, rather than simply checking whether it has a non-NULL
+ tp_as_number pointer.
+
- The imp module now has ways to acquire and release the "import
lock": imp.acquire_lock() and imp.release_lock(). Note: this is a
reentrant lock, so releasing the lock only truly releases it when
@@ -318,6 +322,10 @@ Build
C API
-----
+- PyNumber_Check() now checks that the object has a nb_int or nb_float
+ slot, rather than simply checking whether it has a non-NULL
+ tp_as_number pointer.
+
- A C type that inherits from a base type that defines tp_as_buffer
will now inherit the tp_as_buffer pointer if it doesn't define one.
(SF #681367)