[Python-Dev] pending deprecation warning for Set.update (original) (raw)
Raymond Hettinger python at rcn.com
Wed Sep 17 12:02:00 EDT 2003
- Previous message: [Python-Dev] pending deprecation warning for Set.update
- Next message: [Python-Dev] pending deprecation warning for Set.update
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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 -- unionupdate().
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
################################################################# ################################################################# ################################################################# ##### ##### ##### ################################################################# ################################################################# #################################################################
- Previous message: [Python-Dev] pending deprecation warning for Set.update
- Next message: [Python-Dev] pending deprecation warning for Set.update
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]