]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Add an item about the extension to {}.update() to allow generic
authorBarry Warsaw <barry@python.org>
Tue, 26 Jun 2001 20:12:50 +0000 (20:12 +0000)
committerBarry Warsaw <barry@python.org>
Tue, 26 Jun 2001 20:12:50 +0000 (20:12 +0000)
mapping objects as an argument.

Misc/NEWS

index 7ca09ddd34c1af77350f54e5b54d6bd723c617dc..8cd6c4d7aa16b9e838b8e20f4f0497b32fd0e8ce 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -90,6 +90,11 @@ Core
 - Dictionary objects now support the "in" operator: "x in dict" means
   the same as dict.has_key(x).
 
+- The update() method of dictionaries now accepts generic mapping
+  objects.  Specifically the argument object must support the .keys()
+  and __getitem__() methods.  This allows you to say, for example,
+  {}.update(UserDict())
+
 - Iterators were added; this is a generalized way of providing values
   to a for loop.  See PEP 234.  There's a new built-in function iter()
   to return an iterator.  There's a new protocol to get the next value