You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
No dependencies required (this is a documentation bug)
Expected behavior
Expected behaviour-
The docstring of the sumset() function in maths/sumset.py should correctly describe what the function returns , the sumset of two input sets (all pairwise sums).
additional information -
The bug is in line 8 of maths/sumset.py.
Current (wrong):
:param first set: a set of numbers
:param second set: a set of numbers
:return: the nth number in Sylvester's sequence
Should be:
:param set_a: a set of numbers
:param set_b: a set of numbers
:return: the sumset of set_a and set_b (all pairwise sums a + b)
This appears to be a copy-paste error from maths/sylvester_sequence.py.
Actual behavior
The docstring contains a copy-paste error. The :return: line says:
:return: the nth number in Sylvester's sequence
But the function computes a sumset, not Sylvester's sequence. These are completely different mathematical concepts.
Additionally, the :param names (first set, second set) don't match the actual parameter names (set_a, set_b).
The incorrect docstring in maths/sumset.py misguides users by stating the return value is related to Sylvester's sequence, while it should accurately describe the output as the sumset of set_a and set_b. Additionally, updating the parameter names from first set and second set to set_a and set_b will align the documentation with the actual implementation and improve clarity.
Activity
kristyfairbairn19-design commentedon Aug 11, 2026
jacewq commentedon Aug 12, 2026
The incorrect docstring in
maths/sumset.pymisguides users by stating the return value is related to Sylvester's sequence, while it should accurately describe the output as the sumset ofset_aandset_b. Additionally, updating the parameter names fromfirst setandsecond settoset_aandset_bwill align the documentation with the actual implementation and improve clarity.fix(sumset): correct docstring copy-paste from sylvester_sequence
Fix docstring copy-paste error in maths/sumset.py (#15052)