Skip to content

Commit 6e104dd

Browse files
Add empty set test for sumset
1 parent b18a639 commit 6e104dd

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

maths/sumset.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ def sumset(set_a: set, set_b: set) -> set:
2323
Traceback (most recent call last):
2424
...
2525
AssertionError: The input value of [set_b=3] is not a set
26+
>>> sumset(set(), {1, 2, 3})
27+
set()
2628
"""
2729
assert isinstance(set_a, set), f"The input value of [set_a={set_a}] is not a set"
2830
assert isinstance(set_b, set), f"The input value of [set_b={set_b}] is not a set"

0 commit comments

Comments
 (0)