]> granicus.if.org Git - python/commit
Improvements to set.py:
authorRaymond Hettinger <python@rcn.com>
Sun, 17 Aug 2003 08:34:09 +0000 (08:34 +0000)
committerRaymond Hettinger <python@rcn.com>
Sun, 17 Aug 2003 08:34:09 +0000 (08:34 +0000)
commit6a1801271aa4011cf26e7a64b52f6be10997f267
tree3aaa9dc996dcfd676d809bf585cd498420b3bcbf
parent236ffba40005039cfbc0bd7475345ef7fedf86c5
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.
Doc/lib/libsets.tex
Lib/sets.py
Lib/test/test_sets.py
Misc/NEWS