[Python-Dev] Inconsistent API for sets.Set and build-in set
Raymond Hettinger
python at rcn.com
Thu Jun 30 19:37:00 CEST 2005
> If there are no objections, I propose to do the following (only in
> Python 2.4 and 2.5):
>
> * Add set.union_update() as an alias for set.update().
No. It was intentional to drop the duplicate method with the
hard-to-use name. There was some thought given to deprecating
sets.union_update() but that would have just caused unnecessary grief.
> * Add to docstrings for all methods that 't' can be any
iterable.
> * Update texinfo documentation to add Set.update() and
> set.union_update() and explain that all can take iterables
Feel free to assign a doc patch to me.
> I consider this a bug in 2.4, not a new feature, because without it,
it
> makes more work in porting applications.
Bah. It's just one of the handful of search/replace steps:
Set --> set
ImmutableSet --> frozenset
union_update --> update
> I'm willing to Just Fix It,
Please don't. All of the differences between set and Set were
intentional improvements (i.e. the hash algorithm's are different).
Raymond
More information about the Python-Dev
mailing list