Get the position of an entry or return -1. :param key: The key to be looked up.
(self, key: str | tuple[str, float])
| 124 | return list.index(self, key) |
| 125 | |
| 126 | def find(self, key: str | tuple[str, float]) -> int: |
| 127 | """Get the position of an entry or return -1. |
| 128 | |
| 129 | :param key: The key to be looked up. |
| 130 | """ |
| 131 | try: |
| 132 | return self.index(key) |
| 133 | except ValueError: |
| 134 | return -1 |
| 135 | |
| 136 | def values(self) -> cabc.Iterator[str]: |
| 137 | """Iterate over all values.""" |