diff options
| author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2023-01-18 19:11:18 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-01-18 19:11:18 +0100 |
| commit | 23e886886249ebe8f80a48b0d25fbb5308eeb06f (patch) | |
| tree | ddd2eb220750704fa4fbfd8447654fc3d382bd10 /docs | |
| parent | fd21f82aa82b0d75a161f618ef944ebe0923e0ab (diff) | |
Refs #34233 -- Used str.removeprefix()/removesuffix().
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/howto/custom-lookups.txt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/howto/custom-lookups.txt b/docs/howto/custom-lookups.txt index 2a7ae4a5e5..59f3d30e2d 100644 --- a/docs/howto/custom-lookups.txt +++ b/docs/howto/custom-lookups.txt @@ -312,7 +312,7 @@ would override ``get_lookup`` with something like:: def get_lookup(self, lookup_name): if lookup_name.startswith('x'): try: - dimension = int(lookup_name[1:]) + dimension = int(lookup_name.removeprefix("x")) except ValueError: pass else: |
