« * K @mathspp.com

Rodrigo Girão Serrão 🐍🚀 @mathspp.com

2026-10-15 09:24 UTC

There are many benefits to using `sentinel`. One of them is that typing sentinels is much cleaner than typing any of the alternatives. That's because sentinels can be used as their own type. Just like `None` can 👇

1 picture (not shown on this phone): The same snippet of Python code as in the previous image, but now with type hints. The sentinel is used as its own type…

A reply in a thread.

0 likes, 0 reposts, 1 replies

3 Next post4 More from @mathspp.comBackBluesky home
☆ Save to home · 0 Home · Find · Games · Chat · AI · Setup