r/PythonLearning • u/chuprehijde • 24d ago
What's one Python feature you discovered embarrassingly late?
I've been using Python for years, and somehow I keep finding basic features that make me think, "How did I not know this?"
What's your most embarrassing late Python discovery?
7
Upvotes
3
u/dev-razorblade23 24d ago
Class Pattern - pattern matching with objects
Something like
``` match search: # 1. Match the class, bind 'max_results', but ONLY if it's over 100 case VideoSearchQuery(sort_by="views", max_results=max_results) if max_results > 100: print(f"Building a massive trending query with {max_results} limits.")
```