A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2003-September/038115.html below:

[Python-Dev] pending deprecation warning for Set.update

[Python-Dev] pending deprecation warning for Set.updateRaymond Hettinger python at rcn.com
Wed Sep 17 12:02:00 EDT 2003
> It looks like current CVS has grown a pending deprecation warning for
> the update() method of Sets and that this change has been backported to
> the 2.3 branch.  It seems to me to be bad form to add a warning in a
> maintenance release.

To deprecate would be bad form.
To provide as much advanced warning as possible is good form.
That is much better than having 2.3.1 users spending the next year
developing code with update() and then having it deprecated in 2.4.
They might as well know right now.

> I'm also not clear on the rationale for the warning.  update() seems to
> match the semantics of dict.update(), and it less verbose than the
> suggested alternative -- union_update().

Part of the reason for initially implementing sets in Python instead of C
and for not having it as a builtin was was that the API experimental.
This change was based in part upon user feedback solicited from the
newsgroup.

The verbosity issue weighs less because there is the __ior__ operator
alternative:   a |= b.   That is succinct as you can get.  And the long
form is nothing compared to Set.symmetric_difference_update()    ;-)


Raymond




#################################################################
#################################################################
#################################################################
#####
#####
#####
#################################################################
#################################################################
#################################################################

More information about the Python-Dev mailing list

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