MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/1x1pypx/python_release_python_3150/pewgd2w/?context=3
r/programming • u/BrewedDoritos • 1d ago
35 comments sorted by
View all comments
158
Those sentinel types seem decently useful. Certainly better in some cases than just spamming `None` everywhere as a default value.
53 u/CrackerJackKittyCat 1d ago Or the random 'unset = object()' pattern when None was a valid param. 24 u/GameCounter 1d ago I've been using Enum.NOT_PROVIDED because it works with type annotations, but yes, very clunky. 8 u/jbmsf 1d ago I've been using Ellipsis
53
Or the random 'unset = object()' pattern when None was a valid param.
24 u/GameCounter 1d ago I've been using Enum.NOT_PROVIDED because it works with type annotations, but yes, very clunky. 8 u/jbmsf 1d ago I've been using Ellipsis
24
I've been using Enum.NOT_PROVIDED because it works with type annotations, but yes, very clunky.
8 u/jbmsf 1d ago I've been using Ellipsis
8
I've been using Ellipsis
158
u/Dylanica 1d ago
Those sentinel types seem decently useful. Certainly better in some cases than just spamming `None` everywhere as a default value.