summaryrefslogtreecommitdiffstats
path: root/Misc/NEWS
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2003-12-13 11:26:12 (GMT)
committerRaymond Hettinger <python@rcn.com>2003-12-13 11:26:12 (GMT)
commit8f5cdaa784f555149adf5e94fd2e989f99d6b1db (patch)
treed6a8f66d75cc46f849b5933fb2a57b41e76a7d4f /Misc/NEWS
parentfeb78c94fa444a75b912ca355c3c80d7453f03f0 (diff)
downloadcpython-8f5cdaa784f555149adf5e94fd2e989f99d6b1db.zip
cpython-8f5cdaa784f555149adf5e94fd2e989f99d6b1db.tar.gz
cpython-8f5cdaa784f555149adf5e94fd2e989f99d6b1db.tar.bz2
* Added a new method flag, METH_COEXIST.
* Used the flag to optimize set.__contains__(), dict.__contains__(), dict.__getitem__(), and list.__getitem__().
Diffstat (limited to 'Misc/NEWS')
-rw-r--r--Misc/NEWS6
1 files changed, 6 insertions, 0 deletions
diff --git a/Misc/NEWS b/Misc/NEWS
index a28d042..53dbe06 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -281,6 +281,12 @@ Build
C API
-----
+- Created a new method flag, METH_COEXIST, which causes a method to be loaded
+ even if already defined by a slot wrapper. This allows a __contains__
+ method, for example, to co-exist with a defined sq_contains slot. This
+ is helpful because the PyCFunction can take advantage of optimized calls
+ whenever METH_O or METH_NOARGS flags are defined.
+
- Added a new function, PyDict_Contains(d, k) which is like
PySequence_Contains() but is specific to dictionaries and executes
about 10% faster.