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

Method __call__

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

EnvironmentClass · 0.70
evaluateFunction · 0.70

Tested by

no test coverage detected