MCPcopy Create free account
hub / github.com/dabeaz-course/python-mastery / __init__

Method __init__

Solutions/6_5/validate.py:58–62  ·  view source on GitHub ↗
(self, func)

Source from the content-addressed store, hash-verified

56
57class ValidatedFunction:
58 def __init__(self, func):
59 self.func = func
60 self.signature = signature(func)
61 self.annotations = dict(func.__annotations__)
62 self.retcheck = self.annotations.pop('return', None)
63
64 def __call__(self, *args, **kwargs):
65 bound = self.signature.bind(*args, **kwargs)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected