Unexpected benefit from using #Python 3.10’s match/case syntax:
I replaced code that was essentially equivalent to
```
axes = {
CARTESIAN: ("x", "y", "z"),
CYLINDRICAL: ("r", "theta", "phi"),
}[geometry]
```
with
```
match geometry:
case CARTESIAN:
axes = ("x", "y", "z")
case CYLINDRICAL:
axes = ("r", "theta", "phi")
```
Which is equivalent, right ?
But the *coverage* is not necessarily so !
Embed Notice
HTML Code
Corresponding Notice
- Embed this notice
Clément Robert :python: (neutrinoceros@fosstodon.org)'s status on Monday, 26-Feb-2024 19:51:16 JSTClément Robert :python: