summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2003-08-17 08:34:09 (GMT)
committerRaymond Hettinger <python@rcn.com>2003-08-17 08:34:09 (GMT)
commit6a1801271aa4011cf26e7a64b52f6be10997f267 (patch)
tree3aaa9dc996dcfd676d809bf585cd498420b3bcbf /Misc
parent236ffba40005039cfbc0bd7475345ef7fedf86c5 (diff)
downloadcpython-6a1801271aa4011cf26e7a64b52f6be10997f267.zip
cpython-6a1801271aa4011cf26e7a64b52f6be10997f267.tar.gz
cpython-6a1801271aa4011cf26e7a64b52f6be10997f267.tar.bz2
Improvements to set.py:
* Relaxed the argument restrictions for non-operator methods. They now allow any iterable instead of requiring a set. This makes the module a little easier to use and paves the way for an efficient C implementation which can take better advantage of iterable arguments while screening out immutables. * Deprecated Set.update() because it now duplicates Set.union_update() * Adapted the tests and docs to include the above changes. * Added more test coverage including testing identities and checking to make sure non-restartable generators work as arguments. Will backport to Py2.3.1 so that the interface remains consistent across versions. The deprecation of update() will be changed to a FutureWarning.
Diffstat (limited to 'Misc')
-rw-r--r--Misc/NEWS5
1 files changed, 4 insertions, 1 deletions
diff --git a/Misc/NEWS b/Misc/NEWS
index a3a62be..8f24d85 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -30,7 +30,10 @@ Extension modules
Library
-------
-- sets.py now runs under Py2.2
+- sets.py now runs under Py2.2. In addition, the argument restrictions
+ for most set methods (but not the operators) have been relaxed to
+ allow any iterable. Also the Set.update() has been deprecated because
+ it duplicates Set.union_update().
- random.seed() with no arguments or None uses time.time() as a default
seed. Modified to match Py2.2 behavior and use fractional seconds so