Skip to content

Commit 285b492

Browse files
authored
Update function.py
1 parent 6c8dd50 commit 285b492

1 file changed

Lines changed: 4 additions & 13 deletions

File tree

ultimatepython/syntax/function.py

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -34,21 +34,12 @@ def sum_until(fn, n):
3434

3535

3636
def without_parameters():
37-
"""A function that does not accept parameters and does not return a value.
38-
39-
This function is not used in this module, but it is defined to illustrate
40-
that functions do not need to accept parameters or return values.
41-
"""
42-
print("This function does not accept parameters or return a value.")
37+
"""A function that does not accept parameters and does not return a value."""
38+
pass
4339

4440

4541
def sum(x: int, y: int) -> int:
46-
"""A function that accepts parameters and has type hints.
47-
48-
This function is not used in this module, but it is defined to illustrate
49-
that functions can accept parameters and have type hints.
50-
"""
51-
42+
"""A function that accepts parameters and has type hints."""
5243
return x + y
5344

5445

@@ -73,7 +64,7 @@ def main():
7364
# attribute! Remember this - everything in Python is an object
7465
assert "includes this docstring!" in sum_until.__doc__
7566

76-
# Call the other two functions to ensure they work as expected
67+
# Call a few other functions to show that they are completely valid
7768
assert without_parameters() is None
7869
assert sum(1, 2) == 3
7970

0 commit comments

Comments
 (0)