Return the value of key if already set, otherwise set the value of key to default and return default.
(self, key: StashKey[T], default: T)
| 88 | return default |
| 89 | |
| 90 | def setdefault(self, key: StashKey[T], default: T) -> T: |
| 91 | """Return the value of key if already set, otherwise set the value |
| 92 | of key to default and return default.""" |
| 93 | try: |
| 94 | return self[key] |
| 95 | except KeyError: |
| 96 | self[key] = default |
| 97 | return default |
| 98 | |
| 99 | def __delitem__(self, key: StashKey[T]) -> None: |
| 100 | """Delete the value for key. |
no outgoing calls