▲ | davepeck 9 days ago | ||||||||||||||||||||||||||||||||||||||||
We wanted at least a couple examples that showed use of Python's newer pattern matching capabilities with the new Interpolation type. From this outsider's perspective, I'd say that developer instincts and aesthetic preferences are decidedly mixed here -- even amongst the core team! You can certainly write this as:
Or, y'know, several other ways that might feel more idiomatic depending on where you're coming from. | |||||||||||||||||||||||||||||||||||||||||
▲ | pansa2 9 days ago | parent [-] | ||||||||||||||||||||||||||||||||||||||||
Your example is interesting - `join`, a generator expression and a ternary, and Python requires us to write all of them inside-out. It's a shame we can't write that in a more natural order, something like:
| |||||||||||||||||||||||||||||||||||||||||
|