MCPcopy
hub / github.com/fluentpython/example-code-2e / replace

Method replace

21-async/mojifinder/bottle.py:1881–1883  ·  view source on GitHub ↗

Replace the list of values with a single value.

(self, key, value)

Source from the content-addressed store, hash-verified

1879 self.dict.setdefault(key, []).append(value)
1880
1881 def replace(self, key, value):
1882 ''' Replace the list of values with a single value. '''
1883 self.dict[key] = [value]
1884
1885 def getall(self, key):
1886 ''' Return a (possibly empty) list of values for a key. '''

Callers 15

parse_identifiersFunction · 0.45
parse_identifiersFunction · 0.45
download_oneFunction · 0.45
render_linesFunction · 0.45
mem_test.pyFile · 0.45
atomFunction · 0.45
to_stringFunction · 0.45
tokenizeFunction · 0.45
tokenizeFunction · 0.45
tokenizeFunction · 0.45
_Function · 0.45
zip_replaceFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected