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

Method change

02-array-seq/lispy/py3.9/lis.py:65–71  ·  view source on GitHub ↗

Find where key is defined and change the value there.

(self, key: Symbol, value: object)

Source from the content-addressed store, hash-verified

63 "A ChainMap that allows changing an item in-place."
64
65 def change(self, key: Symbol, value: object) -> None:
66 "Find where key is defined and change the value there."
67 for map in self.maps:
68 if key in map:
69 map[key] = value # type: ignore[index]
70 return
71 raise KeyError(key)
72
73
74def standard_env() -> Environment:

Callers 1

evaluateFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected