On Wed, Sep 17, 2003 at 12:02:00PM -0400, Raymond Hettinger wrote: > The verbosity issue weighs less because there is the __ior__ operator > alternative: a |= b. That is succinct as you can get. >>> from sets import Set >>> s = Set() >>> s |= [1, 2, 3] Traceback (most recent call last): File "<stdin>", line 1, in ? File "/www/plat/python2.3/lib/python2.3/sets.py", line 420, in __ior__ self._binary_sanity_check(other) File "/www/plat/python2.3/lib/python2.3/sets.py", line 313, in _binary_sanity_check raise TypeError, "Binary operation only permitted between sets" TypeError: Binary operation only permitted between sets >>> s.update([1, 2, 3]) >>> s Set([1, 2, 3]) >>> I quite a few instances of update() that will have to be changed to union_update(). Neil
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4