diff options
author | Raymond Hettinger <python@rcn.com> | 2002-11-27 07:29:33 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2002-11-27 07:29:33 (GMT) |
commit | e33d3df03079d704edbe159be079dc387058f044 (patch) | |
tree | b9b68ea6479278b215f1ed03ee75ac9e4fcc03ce /Misc/NEWS | |
parent | e9cfcef71eec755ad38a0764336920ecebb76344 (diff) | |
download | cpython-e33d3df03079d704edbe159be079dc387058f044.zip cpython-e33d3df03079d704edbe159be079dc387058f044.tar.gz cpython-e33d3df03079d704edbe159be079dc387058f044.tar.bz2 |
SF Patch 643443. Added dict.fromkeys(iterable, value=None), a class
method for constructing new dictionaries from sequences of keys.
Diffstat (limited to 'Misc/NEWS')
-rw-r--r-- | Misc/NEWS | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -270,6 +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. + - Added a new dict method pop(key). This removes and returns the value corresponding to key. [SF patch #539949] |