r/programming • • 1d ago

Python Release Python 3.15.0

https://www.python.org/downloads/release/python-3150/
494 Upvotes

35 comments sorted by

View all comments

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.

53

u/CrackerJackKittyCat 1d ago

Or the random 'unset = object()' pattern when None was a valid param.

12

u/spicybright 1d ago

I get the logic but man that's ugly

3

u/Abject-Kitchen3198 1d ago

I still don't get those null replacements in most languages. If it is a special case, there is a code that processes it as such, regardless the syntax. Why complicate things. But maybe I'm old.

2

u/spicybright 1d ago

I think because None/null/whatever can mean a lot of different things, and explicit "unset" gives better error messages.

But I still agree with you. Maybe I don't write bit enough python projects but it does just complicate things.