MCPcopy Create free account
hub / github.com/bslatkin/effectivepython / subtract

Function subtract

example_code/item_124_example_02.py:22–23  ·  view source on GitHub ↗
(a: int, b: int)

Source from the content-addressed store, hash-verified

20# Check types in this file with: python3 -m mypy <path>
21
22def subtract(a: int, b: int) -> int: # Function annotation
23 return a - b
24
25subtract(10, "5") # Oops: passed string value

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected