As u/energybased already mentioned, None doesn't always work as a sentinel.
For example, when None is a valid value itself – how do you distinguish None-as-sentinel from None-as-value? This isn't necessarily common in user code, but happens quite a lot in libraries (when you want to allow the user to use None); I talk more about this in a comment below.
View all comments
Show parent comment
3
u/genericlemon24 Jun 06 '21
As u/energybased already mentioned, None doesn't always work as a sentinel.
For example, when None is a valid value itself – how do you distinguish None-as-sentinel from None-as-value? This isn't necessarily common in user code, but happens quite a lot in libraries (when you want to allow the user to use None); I talk more about this in a comment below.