MCPcopy Index your code
hub / github.com/RustPython/RustPython / pop

Method pop

Lib/collections/__init__.py:1096–1101  ·  view source on GitHub ↗

Remove *key* from maps[0] and return its value. Raise KeyError if *key* not in maps[0].

(self, key, *args)

Source from the content-addressed store, hash-verified

1094 raise KeyError('No keys found in the first mapping.')
1095
1096 def pop(self, key, *args):
1097 'Remove *key* from maps[0] and return its value. Raise KeyError if *key* not in maps[0].'
1098 try:
1099 return self.maps[0].pop(key, *args)
1100 except KeyError:
1101 raise KeyError(f'Key not found in the first mapping: {key!r}')
1102
1103 def clear(self):
1104 'Clear maps[0], leaving maps[1:] intact.'

Callers 15

__delitem__Method · 0.45
popitemMethod · 0.45
popMethod · 0.45
__reduce__Method · 0.45
popMethod · 0.45
_yield_finished_futuresFunction · 0.45
result_iteratorMethod · 0.45
runMethod · 0.45
process_result_itemMethod · 0.45
CFUNCTYPEFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected