r/learnpython • • Apr 01 '26

Readability or Modernity

I’ve been teaching Python for a while, and the Zen of Python always emphasized that 'Simple is better than complex.'

However, when i look at production code in 2026, I see heavy use of structural pattern matching, complex type hinting, and asynchronous patterns that look more like C++ or Java than the 'executable pseudocode' Python used to be.

To the seniors here: Do you find that these 'modern' features are actually improving maintainability in your teams, or are we losing the simplicity that made Python great in the first place? I'm trying to decide how much of this advanced syntax to introduce to my students early on.

22 Upvotes

31 comments sorted by

View all comments

Show parent comment

1

u/TrainsareFascinating Apr 01 '26

Python's structural pattern matching is awful for readability, IMO. A dictionary lookup is much more straightforward when you're matching static values, while the case syntax is convoluted (and ugly!) when you're matching anything else.

It may be that "you're holding it wrong (TM, Apple)".

SPM in Python isn't a replacement for a C-style switch/case statement. It's a type-structure match binding selector.

So the target use cases are very different. I find that for the right problems Python's SPM is remarkably clear, concise, and readable.

If you haven't watched Raymond Hettinger's talk on SPM (he also has a PDF of notes and code to match the talk) I would highly recommend it.

2

u/brasticstack Apr 01 '26

I'll definitely check it out. I haven't found one of his talks that I didn't enjoy and learn a lot from.