(self, name: str)
| 78 | self.attrs = convert_attrs(self.attrs) |
| 79 | |
| 80 | def attrIndex(self, name: str) -> int: |
| 81 | warnings.warn( # noqa: B028 |
| 82 | "Token.attrIndex should not be used, since Token.attrs is a dictionary", |
| 83 | UserWarning, |
| 84 | ) |
| 85 | if name not in self.attrs: |
| 86 | return -1 |
| 87 | return list(self.attrs.keys()).index(name) |
| 88 | |
| 89 | def attrItems(self) -> list[tuple[str, str | int | float]]: |
| 90 | """Get (key, value) list of attrs.""" |