summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2002-11-27 13:10:40 (GMT)
committerGuido van Rossum <guido@python.org>2002-11-27 13:10:40 (GMT)
commitc0d3f4e445cd74933e298fc0fe793805cf15d6eb (patch)
treeea826ed445fe5ea0a24776527c1e83a8245928a0 /Misc
parentcaf17be1b7886f4c51558fb10ec8a51483102d38 (diff)
downloadcpython-c0d3f4e445cd74933e298fc0fe793805cf15d6eb.zip
cpython-c0d3f4e445cd74933e298fc0fe793805cf15d6eb.tar.gz
cpython-c0d3f4e445cd74933e298fc0fe793805cf15d6eb.tar.bz2
Rephrase dict.fromkeys() news.
Diffstat (limited to 'Misc')
-rw-r--r--Misc/NEWS9
1 files changed, 5 insertions, 4 deletions
diff --git a/Misc/NEWS b/Misc/NEWS
index 066f8a5..4109391 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -270,10 +270,11 @@ Core and builtins
an optional argument that specifies the characters to strip. For
example, "Foo!!!?!?!?".rstrip("?!") -> "Foo".
-- Dictionaries have a new class method, fromkeys(iterable, value=None).
- It constructs a new dictionary with keys taken from the iterable and
- all values set to a single value. It is used for building membership
- tests and for removing duplicates from sequences.
+- There's a new dictionary constructor (a class method of the dict
+ class), dict.fromkeys(iterable, value=None). It constructs a
+ dictionary with keys taken from the iterable and all values set to a
+ single value. It can be used for building sets and for removing
+ duplicates from sequences.
- Added a new dict method pop(key). This removes and returns the
value corresponding to key. [SF patch #539949]