summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2000-12-12 22:10:31 (GMT)
committerGuido van Rossum <guido@python.org>2000-12-12 22:10:31 (GMT)
commit3661d3947429bc809eaf851467bf5b0a1192012b (patch)
tree97042cf8afea4ee46a1036145842602360592a5e /Misc
parent723ad8ae738e02a5b6f6f1d172cf297db1c11b26 (diff)
downloadcpython-3661d3947429bc809eaf851467bf5b0a1192012b.zip
cpython-3661d3947429bc809eaf851467bf5b0a1192012b.tar.gz
cpython-3661d3947429bc809eaf851467bf5b0a1192012b.tar.bz2
Describe {}.popitem().
Diffstat (limited to 'Misc')
-rw-r--r--Misc/NEWS7
1 files changed, 7 insertions, 0 deletions
diff --git a/Misc/NEWS b/Misc/NEWS
index 2b1d7b8..4bb2425 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -27,6 +27,13 @@ Core language, builtins, and interpreter
fit in an int. In 1.6 and earlier, a negative long formatted
via %u raised an error if it was too big to fit in an int.
+- Dictionary objects have an odd new method, popitem(). This removes
+ an arbitrary item from the dictionary and returns it (in the form of
+ a (key, value) pair). This can be useful for algorithms that use a
+ dictionary as a bag of "to do" items and repeatedly need to pick one
+ item. Such algorithms normally end up running in quadratic time;
+ using popitem() they can usually be made to run in linear time.
+
Windows changes
- select module: By default under Windows, a select() call