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