Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/dabeaz-course/python-mastery
/ check
Method
check
Solutions/9_2/structly/validate.py:41–44 ·
view source on GitHub ↗
(cls, value)
Source
from the content-addressed store, hash-verified
39
class
Positive(Validator):
40
@classmethod
41
def
check(cls, value):
42
if
value < 0:
43
raise
ValueError(
'must be >= 0'
)
44
return
super().check(value)
45
46
class
NonEmpty(Validator):
47
@classmethod
Callers
nothing calls this directly
Calls
1
check
Method · 0.45
Tested by
no test coverage detected