Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/dabeaz-course/python-mastery
/ add
Function
add
Solutions/4_2/validate.py:48–51 ·
view source on GitHub ↗
(x, y)
Source
from the content-addressed store, hash-verified
46
# Examples
47
if
__name__ ==
'__main__'
:
48
def
add(x, y):
49
Integer.check(x)
50
Integer.check(y)
51
return
x + y
52
53
class
Stock:
54
__slots__ = (
'name'
,
'_shares'
,
'_price'
)
Callers
nothing calls this directly
Calls
1
check
Method · 0.45
Tested by
no test coverage detected