
Dec. 2, 2021
3:53 a.m.
On Wed, Dec 1, 2021, 10:38 PM Steven D'Aprano
"If param is missing **or None**, the default if blah..." I reject Chris' characterisation of this as a hack. There are function parameters where None will *never* in any conceivable circumstances become a valid argument value, and it is safe to use it as a sentinel.
In particular, the cases where None will never, in any conceivable circumstances, be a non-sentinel value are at least 98% of all the functions (that have named parameters) I've ever written in Python. All of this discussion of a syntax change is for, at most, 2% of functions that need a different sentinel.