Nicholas Cole
"There is nothing that this proposal makes possible that is not already
possible with more explicit code."

There's nothing any of Python's syntax makes possible that is not already possible with Brainfuck or any other language that's Turing complete. The current hacks used to get around the lack of late-bound optional parameters aren't more explicit. They just require more code. If the coder's intent is to have an optional parameter default to an empty list, the most EXPLICIT way to encode that intent would be to have the optional parameter default to an empty list. It's categorically LESS EXPLICIT to bind the parameter to None and add boilerplate code to the body of the function to correct that.

On Thursday, December 2, 2021 at 11:20:43 AM UTC-6 Nicholas Cole wrote:
On Wed, Dec 1, 2021 at 6:18 AM Chris Angelico <ros...@gmail.com> wrote:
>
> I've just updated PEP 671 https://www.python.org/dev/peps/pep-0671/
> with some additional information about the reference implementation,
> and some clarifications elsewhere.
>
> *PEP 671: Syntax for late-bound function argument defaults*
>
> Questions, for you all:
>
> 1) If this feature existed in Python 3.11 exactly as described, would
> you use it?

I would actively avoid using this feature and discourage people from
using it because:

> 2) Independently: Is the syntactic distinction between "=" and "=>" a
> cognitive burden?

I think that this imposes a significant cognitive burden, not for the
simple cases, but when combined with the more advanced function
definition syntax. I think this has the potential to make debugging
large code-bases much harder.

There is nothing that this proposal makes possible that is not already
possible with more explicit code.
_______________________________________________
Python-ideas mailing list -- python...@python.org
To unsubscribe send an email to python-id...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at https://mail.python.org/archives/list/python...@python.org/message/3WSRN5NMENAPEUAYQPZCKUW2G43PNJM7/
Code of Conduct: http://python.org/psf/codeofconduct/