On Tue, 26 Jul 2022 at 19:37, Mathew Elman <mathew.el...@ocado.com> wrote:
>
> I believe this is a rebirth of a request that has come up many times before, 
> which is to have something like javascript's `undefined` where it means "use 
> the default value" if passed to a function that has a default value or "value 
> not provided" (slightly different to "None").
>
> >> def foo(x, y=1):
> ...      return x, y
>
> >> foo(undefined, undefined)
> undefined, 1
>

I've spent a lot of time writing JS code, and trust me, this isn't a
good idea. Let's not go down that path.

ChrisA
_______________________________________________
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/WFSNK6K44RZE5ASV5M5VKDFHZSPY2XAQ/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to