Vivis Dev
banner
vivis-dev.bsky.social
Vivis Dev
@vivis-dev.bsky.social
Python | AI | DevOps
Subscribe to my free python newsletter: https://pythonkoans.substack.com
Understanding Late Binding in Python Closures

open.substack.com/pub/pythonko...
Koan 6: The Forgetful Calligrapher
Understanding Late Binding in Python Closures
open.substack.com
August 5, 2025 at 12:51 PM
#python uses the flyweight design pattern to intern strings
August 5, 2025 at 12:51 PM
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
Understanding Python’s LEGB rule, closures, and how names echo through nested functions
pythonkoans.substack.com
August 5, 2025 at 12:49 PM
#python sets are useful when you need:

- fast membership testing
- deduplication or uniqueness guarantees
- comparing two sets of items
August 5, 2025 at 12:48 PM
#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]
August 5, 2025 at 12:47 PM
#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
August 5, 2025 at 12:46 PM
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
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.
pythonkoans.substack.com
August 5, 2025 at 12:44 PM
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?
June 3, 2025 at 4:52 AM