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

Method append

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

Add a new value to the list of values for this key.

(self, key, value)

Source from the content-addressed store, hash-verified

1875 return default
1876
1877 def append(self, key, value):
1878 ''' Add a new value to the list of values for this key. '''
1879 self.dict.setdefault(key, []).append(value)
1880
1881 def replace(self, key, value):
1882 ''' Replace the list of values with a single value. '''

Callers 15

__setitem__Method · 0.95
__new__Method · 0.45
__new__Method · 0.45
__new__Method · 0.45
__new__Method · 0.45
__new__Method · 0.45
__init__Method · 0.45
match_asian_citiesFunction · 0.45
match_asian_cities_posFunction · 0.45
match_asian_countriesFunction · 0.45
match_indiaFunction · 0.45

Calls 1

setdefaultMethod · 0.80

Tested by 3

test_many_levels_1_leafFunction · 0.36
test_many_levels_1_leafFunction · 0.36
test_many_levels_1_leafFunction · 0.36