diff options
author | Raymond Hettinger <python@rcn.com> | 2003-12-13 11:26:12 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2003-12-13 11:26:12 (GMT) |
commit | 8f5cdaa784f555149adf5e94fd2e989f99d6b1db (patch) | |
tree | d6a8f66d75cc46f849b5933fb2a57b41e76a7d4f /Misc/NEWS | |
parent | feb78c94fa444a75b912ca355c3c80d7453f03f0 (diff) | |
download | cpython-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/NEWS | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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. |