summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2001-05-11 21:51:48 (GMT)
committerTim Peters <tim.peters@gmail.com>2001-05-11 21:51:48 (GMT)
commitd85e102337725554a43027fe90e54dd886f4ec9a (patch)
treed0bc76afbeace03a71537ba84504c2eea891c171 /Misc
parent564a6cc8cae4cd9461c01ac4c7a14915744bcc1e (diff)
downloadcpython-d85e102337725554a43027fe90e54dd886f4ec9a.zip
cpython-d85e102337725554a43027fe90e54dd886f4ec9a.tar.gz
cpython-d85e102337725554a43027fe90e54dd886f4ec9a.tar.bz2
Variant of patch #423262: Change module attribute get & set
Allow module getattr and setattr to exploit string interning, via the previously null module object tp_getattro and tp_setattro slots. Yields a very nice speedup for things like random.random and os.path etc.
Diffstat (limited to 'Misc')
-rw-r--r--Misc/NEWS3
1 files changed, 3 insertions, 0 deletions
diff --git a/Misc/NEWS b/Misc/NEWS
index 8b4021f..b485959 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -44,6 +44,9 @@ Core
'x in y' and 'x not in y' (PySequence_Contains() in C API)
operator.countOf() (PySequence_Count() in C API)
+- Accessing module attributes is significantly faster (for example,
+ random.random or os.path or yourPythonModule.yourAttribute).
+
- Comparing dictionary objects via == and != is faster, and now works even
if the keys and values don't support comparisons other than ==.