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

Function add

example_code/item_124_example_08.py:39–40  ·  view source on GitHub ↗
(x: Real, y: Real)

Source from the content-addressed store, hash-verified

37Real = TypeVar("Real", int, float)
38
39def add(x: Real, y: Real) -> Real:
40 return x + y
41
42inputs = [1, 2, 3, 4j] # Oops: included a complex number
43result = combine(add, inputs)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected