(self, key: _Key, *args: Union[_Value, _T])
| 140 | return default |
| 141 | |
| 142 | def pop(self, key: _Key, *args: Union[_Value, _T]) -> Union[_Value, _T]: |
| 143 | if len(args) > 1: |
| 144 | raise TypeError("pop expected at most 2 arguments, got " + repr(1 + len(args))) |
| 145 | try: |
| 146 | value = self[key] |
| 147 | except KeyError: |
| 148 | if args: |
| 149 | return args[0] |
| 150 | raise |
| 151 | del self[key] |
| 152 | return value |
| 153 | |
| 154 | def popitem(self) -> Tuple[_Key, _Value]: |
| 155 | try: |
no outgoing calls