Are you re-raising exceptions just to add extra context? Since Python 3.11 you can attach notes to exceptions instead #PythonDev #python
Notes #
Short-form thoughts, saved links, and quoted fragments.
#PythonDev #python
“pythonkoans.substack.com/p/koan-15-th...”
#PythonDev #python
“open.substack.com/pub/pythonko...”
open.substack.com/pub/pythonko...
Koan 20: The Unreliable Messenger open.substack.com / https://open.substack.com/pub/pythonkoans/p/koan-20-the-unreliable-messenger?utm_source=share&utm_medium=android&r=5yt43c Exploring traps in try/finally blocks, and the reasoning behind PEP601 and PEP765open.substack.com/pub/pythonko...
Koan 10: The Flowing River (Part 1) open.substack.com / https://open.substack.com/pub/pythonkoans/p/koan-10-the-flowing-river-part-1?utm_source=share&utm_medium=android&r=5yt43c Understanding how Python's list comprehensions work under the hoodVibecoding “floods the zone” for the developer. They get absolutely inundated with chat output as well as code diffs. No matter how much you “review” you’re never going to understand the code as much as if you had written it yourself.
One thing I detest about AI generated Python code is the ungodly amount of private helpers to do basic shit: def _strip_whitespace def _get_first_element Just stop.
pythonkoans.substack.com/p/koan-15-th...
Koan 15: The Invisible Ink pythonkoans.substack.com / https://pythonkoans.substack.com/p/koan-15-the-invisible-ink Understanding Unicode equivalence and the deceptive nature of glyphsUnderstanding Late Binding in Python Closures open.substack.com/pub/pythonko...
Koan 6: The Forgetful Calligrapher open.substack.com / https://open.substack.com/pub/pythonkoans/p/the-forgetful-calligrapher?r=5yt43c&utm_campaign=post&utm_medium=web Understanding Late Binding in Python Closures#python uses the flyweight design pattern to intern strings
Unravelling how Python finds and binds names, and why variables sometimes behave like shadows. pythonkoans.substack.com/p/koan-4-the...
Koan 4: The Grand Library pythonkoans.substack.com / https://pythonkoans.substack.com/p/koan-4-the-grand-library Understanding Python’s LEGB rule, closures, and how names echo through nested functions#python sets are useful when you need: - fast membership testing - deduplication or uniqueness guarantees - comparing two sets of items
#python list tips: - reversed(list) is more memory efficient for reversing a list than slicing list[::-1] because it returns an iterator instead of a copy - You can remove multiple items with slice assignment using list[1:4] = [] or del a[1:4]
#python variable scoping can be confusing if you’re used to other programming languages. A scope determines where a variable name is visible, and it’s lifetime. Python checks for the variable definition in the following order, and stops at the first match
It’s been a fun July writing Python Koans, I’m hoping to carry this momentum for the rest of the year! If you have suggestions or topics you want me to cover, feel free to DM me! #python pythonkoans.substack.com
Python Koans | Vivis Dev | Substack pythonkoans.substack.com / https://pythonkoans.substack.com Python lessons wrapped in koans. Small puzzles, deep truths. Not your usual tutorial thread. Click to read Python Koans, by Vivis Dev, a Substack publication with hundreds of subscribers.ChatGPT has started quietly nudging people towards their search extension. It's been out since December 2024, and has 4M users. Will this make a dent into Google?
