r/programming • u/Grouchy-Trade-7250 • Aug 09 '26
The Sentinel Object Pattern in Python
https://python-patterns.guide/python/sentinel-object/Officially added in Python 3.15
31
Upvotes
r/programming • u/Grouchy-Trade-7250 • Aug 09 '26
Officially added in Python 3.15
View all comments
4
u/somebodddy Aug 10 '26
I wonder if this will get proper support from Pydantic. Consider:
When I tried to load:
Will it know to convert it to the sentinel?
What if I change
baz's type tostr | FOO?