2% of functions is a lot of functions. We're talking about a language 
that's been around 30 years. The feature set is pretty mature. If it were 
lacking features that would improve a much larger percent of code for so 
long, I don't think it would be as popular. It's not like the next PIP is 
going to be as big as the for-loop.
On Wednesday, December 1, 2021 at 9:56:40 PM UTC-6 David Mertz, Ph.D. wrote:

> 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.
>
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/UJYHPTIAKEITYW6N2NK6KRINV4TPAE2M/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to