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

Method change

02-array-seq/lispy/py3.10/lis.py:68–74  ·  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

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

Callers 1

evaluateFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected