MCPcopy
hub / github.com/aws/aws-cli / _path_set

Method _path_set

awscli/botocore/paginate.py:163–173  ·  view source on GitHub ↗

Set the value of a key in the given data. Example: data = {'foo': ['bar', 'baz']} path = ['foo', 1] value = 'bin' ==> data = {'foo': ['bar', 'bin']}

(self, data, path, value)

Source from the content-addressed store, hash-verified

161 return d
162
163 def _path_set(self, data, path, value):
164 """Set the value of a key in the given data.
165
166 Example:
167 data = {'foo': ['bar', 'baz']}
168 path = ['foo', 1]
169 value = 'bin'
170 ==> data = {'foo': ['bar', 'bin']}
171 """
172 container = self._path_get(data, path[:-1])
173 container[path[-1]] = value
174
175
176class PaginatorModel:

Callers 1

_decodeMethod · 0.95

Calls 1

_path_getMethod · 0.95

Tested by

no test coverage detected