• Raymond Hettinger's avatar
    Backport improvements to set.py so that the interface will remain · 27ea5783
    Raymond Hettinger yazdı
    consistent across versions.
    
    * 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.
    
    * Added a PendingDeprecationWarning for 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.
    27ea5783
test_sets.py 25.7 KB