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

Method __call__

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

Source from the content-addressed store, hash-verified

184 self.env = env
185
186 def __call__(self, *args: Expression) -> Any: # <3>
187 local_env = dict(zip(self.parms, args)) # <4>
188 env = Environment(local_env, self.env) # <5>
189 for exp in self.body: # <6>
190 result = evaluate(exp, env)
191 return result # <7>
192# end::PROCEDURE[]
193
194

Callers

nothing calls this directly

Calls 2

EnvironmentClass · 0.70
evaluateFunction · 0.70

Tested by

no test coverage detected