MCPcopy
hub / github.com/fluentpython/example-code-2e / __call__

Method __call__

18-with-match/lispy/py3.9/lis.py:185–190  ·  view source on GitHub ↗
(self, *args: Expression)

Source from the content-addressed store, hash-verified

183 self.env = env
184
185 def __call__(self, *args: Expression) -> Any:
186 local_env = dict(zip(self.parms, args))
187 env = Environment(local_env, self.env)
188 for exp in self.body:
189 result = evaluate(exp, env)
190 return result
191
192
193################ command-line interface

Callers

nothing calls this directly

Calls 2

EnvironmentClass · 0.70
evaluateFunction · 0.70

Tested by

no test coverage detected