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)
| 92 | return default |
| 93 | |
| 94 | def setdefault(self, key: StashKey[T], default: T) -> T: |
| 95 | class="st">"""Return the value of key if already set, otherwise set the value |
| 96 | of key to default and return default.class="st">""" |
| 97 | try: |
| 98 | return self[key] |
| 99 | except KeyError: |
| 100 | self[key] = default |
| 101 | return default |
| 102 | |
| 103 | def __delitem__(self, key: StashKey[T]) -> None: |
| 104 | class="st">"""Delete the value for key. |
no outgoing calls