This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Misleading in library/sets document
Type: Stage: resolved
Components: Documentation Versions: Python 2.7
process
Status: closed Resolution:
Dependencies: Superseder:
Assigned To: docs@python Nosy List: DeadmanWalking, docs@python, josh.r, rhettinger, xtreak
Priority: normal Keywords:

Created on 2019-03-05 14:34 by DeadmanWalking, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (4)
msg337192 - (view) Author: Han (DeadmanWalking) Date: 2019-03-05 14:34
Doc/library/sets.rst said operation s.update(t)'s result is "return set s with elements added from t".
But update()'s return value is None.
I think change it to "set s with elements added from t" would be better.
So are operations intersection_update(), difference_update(), and symmetric_difference_update().
msg337206 - (view) Author: Karthikeyan Singaravelan (xtreak) * (Python committer) Date: 2019-03-05 15:27
To add to this is actually present in sets module documentation which has been deprecated since 2.6 though the report is true that the methods don't return a set.

Link : https://docs.python.org/2/library/sets.html#set-objects
msg337276 - (view) Author: Josh Rosenberg (josh.r) * (Python triager) Date: 2019-03-06 03:57
The "returns" bit is accurate when referring to the in-place operator overloads (__ior__), so those lines may have been written referring to the overloads described on the same line (they shouldn't have been written that way, but that would explain why only the methods with in-place overload equivalents use the word "returns").

Either way, sets was deprecated in 2.6, largely pointless in every version but 2.3 (module added in 2.3, built-in set/frozenset types added 2.4), and gone in 3.0+ (and 2.7 is EOL within the year). Do we even do doc updates for stuff this dead?
msg337280 - (view) Author: Han (DeadmanWalking) Date: 2019-03-06 05:24
Thanks, I didn't notice the Deprecated sign on the Sets page.
History
Date User Action Args
2022-04-11 14:59:12adminsetgithub: 80379
2019-03-06 05:24:43DeadmanWalkingsetstatus: open -> closed

messages: + msg337280
stage: resolved
2019-03-06 03:57:00josh.rsetnosy: + josh.r
messages: + msg337276
2019-03-05 15:27:56xtreaksetnosy: + rhettinger, xtreak
messages: + msg337206
2019-03-05 14:34:50DeadmanWalkingcreate