@mathspp.comRodrigo Girão Serrão 🐍🚀 @mathspp.com
2026-10-15 09:24 UTC
What do you do when you can't use `None` as the default? You can use `object()`... Or a singleton class... Or another workaround... And all these hacks had flaws. That's why Python 3.15 introduced the built-in `sentinel`. You can use it to create placeholder values 👇
1 picture (not shown on this phone): Snippet of Python code showing how to use the built-in `sentinel` in 3.15
3 likes, 0 reposts, 1 replies
3 Next post4 More from @mathspp.comBackBluesky home