Skip to content

fix: correct sumset() docstring - #15039

Closed
deepshekhardas wants to merge 2 commits into
TheAlgorithms:masterfrom
deepshekhardas:fix-15013-sumset-docstring
Closed

fix: correct sumset() docstring#15039
deepshekhardas wants to merge 2 commits into
TheAlgorithms:masterfrom
deepshekhardas:fix-15013-sumset-docstring

Conversation

@deepshekhardas

@deepshekhardas deepshekhardas commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Describe your change

  • Add an algorithm?
  • Fix a bug or typo in an existing algorithm?
  • Add, change, or clarify documentation?

What does this implement/fix?

The docstring of sumset() in maths/sumset.py was a copy-paste from sylvester_sequence.py. Correct the param names and return description to describe the sumset (all pairwise sums a + b).

Additional comments?

None.

Fixes #15013

@priya-sundaram-dev

Copy link
Copy Markdown
Contributor

Good catch — the old docstring wrongly described Sylvester's sequence. This fix is clean and mergeable. Note there are two sibling PRs fixing the same docstring: #15014 is byte-identical to this one, and #15038 adds an extra empty-set doctest but is currently conflicting. Recommending this one as the keeper; the other two can be closed once this lands (worth cherry-picking #15038's sumset(set(), …) doctest here first).

This was referenced Sep 8, 2026
@cclauss cclauss closed this Sep 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting reviews This PR is ready to be reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: maths/sumset.py docstring incorrectly references Sylvester's sequence

3 participants