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

Method __call__

02-array-seq/lispy/py3.10/lis.py:191–196  ·  view source on GitHub ↗
(self, *args: Expression)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

EnvironmentClass · 0.70
evaluateFunction · 0.70

Tested by

no test coverage detected