Skip to content

Commit

Permalink
BUGFIX: 3-arg subtraction was not implemented.
Browse files Browse the repository at this point in the history
The following change allows use of sub like  ..

Now added! This is a bug, not an enhacenement.
  • Loading branch information
Matthew Baird committed Jan 4, 2023
1 parent 0e54bd7 commit 4082148
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/calc.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ def add(a, b, third_operand = 0):
"""
return a + b + third_operand

def sub(a, b):
def sub(a, b, c=0):
"""
Subtract some numbers
```py
sub(8, 3) # 5
```
"""
return a - b
return a - b - c

1 comment on commit 4082148

@matthewdbaird
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Testing out

Please sign in to comment.