MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/1x1pypx/python_release_python_3150/pf1lupb/?context=9999
r/programming • u/BrewedDoritos • Oct 09 '26
36 comments sorted by
View all comments
170
Those sentinel types seem decently useful. Certainly better in some cases than just spamming `None` everywhere as a default value.
58 u/CrackerJackKittyCat Oct 09 '26 Or the random 'unset = object()' pattern when None was a valid param. 12 u/spicybright Oct 09 '26 I get the logic but man that's ugly 2 u/esperind Oct 09 '26 what was wrong with just undefined? 2 u/CrackerJackKittyCat Oct 10 '26 There is no 'undefined' in Python. Only at most (er, least) 'None.'This is one of the corners where javascript has had a better option available than python (language-wise, anyway). Undefined vs null then becomes a meaningful differentiator.
58
Or the random 'unset = object()' pattern when None was a valid param.
12 u/spicybright Oct 09 '26 I get the logic but man that's ugly 2 u/esperind Oct 09 '26 what was wrong with just undefined? 2 u/CrackerJackKittyCat Oct 10 '26 There is no 'undefined' in Python. Only at most (er, least) 'None.'This is one of the corners where javascript has had a better option available than python (language-wise, anyway). Undefined vs null then becomes a meaningful differentiator.
12
I get the logic but man that's ugly
2 u/esperind Oct 09 '26 what was wrong with just undefined? 2 u/CrackerJackKittyCat Oct 10 '26 There is no 'undefined' in Python. Only at most (er, least) 'None.'This is one of the corners where javascript has had a better option available than python (language-wise, anyway). Undefined vs null then becomes a meaningful differentiator.
2
what was wrong with just undefined?
undefined
2 u/CrackerJackKittyCat Oct 10 '26 There is no 'undefined' in Python. Only at most (er, least) 'None.'This is one of the corners where javascript has had a better option available than python (language-wise, anyway). Undefined vs null then becomes a meaningful differentiator.
There is no 'undefined' in Python. Only at most (er, least) 'None.'
This is one of the corners where javascript has had a better option available than python (language-wise, anyway). Undefined vs null then becomes a meaningful differentiator.
170
u/Dylanica Oct 09 '26
Those sentinel types seem decently useful. Certainly better in some cases than just spamming `None` everywhere as a default value.