We can't find the internet
Attempting to reconnect
Something went wrong!
Attempting to reconnect
← All tracks
0 / 4
Modern Syntax and Modernisation
PythonStructural pattern matching, f-string internals, PEP 695 syntax and the version-gated features worth adopting.
This track is written for Python, which isn't the mode you're browsing in.
0
/ 12 solved
· 6 articles
- 1. The old way → new way reference table Read
- 2. Where f-strings are the wrong answer Read
- 3. When `match` is better than `if/elif` — and when it isn't Read
- 4. PEP 758: `except A, B:` without parentheses Read
- 5. PEP 798: unpacking in comprehensions Read
- 6. PEP 810: explicit lazy imports Read
- 7. Not solved yet. PEP 686: UTF-8 by default, and the migration hazard
- 8. Not solved yet. The f-string format specification mini-language
- 9. Not solved yet. PEP 701: what f-strings can finally do in 3.12
- 10. Not solved yet. Self-documenting f-strings: f"{x=}"
- 11. Not solved yet. match/case fundamentals: literal, capture, wildcard
- 12. Not solved yet. Class patterns, __match_args__ and an expression simplifier
- 13. Not solved yet. Exhaustive matching with assert_never
- 14. Not solved yet. Guards, OR patterns, AS patterns and the binding rules
- 15. Not solved yet. Sequence and mapping patterns: the two rules everyone gets wrong
- 16. Not solved yet. Positional-only `/` and keyword-only `*`
- 17. Not solved yet. Template strings (t-strings) and interpolation safety
- 18. Not solved yet. The walrus operator, tastefully
Check yourself
4 questions · one attempt eachThese do not count toward finishing the track. They are here to catch the things that are easy to read past.
Col is an Enum with R = 1. What do Col.R is Col(1) and Col.R == 1 give?
class Col(enum.Enum):
R = 1
Col.R is Col(1)
Col.R == 1
Question 1 of 4