On 31.10.21 12:34, Chris Angelico wrote:
Google's smarter than that. I've searched for symbols before and found
plenty of good results. For instance, I can search for information
about the @ sign before a function, or independently, for a @ b, and
get information about decorators or matrix multiplication. We don't
need words - especially not words that will break people's code - in
order for people to find information.

It seems we disagree here. :)

It's a completely different feature, and has very different
consequences. It is not a complete replacement for default
expressions. Notably, it can't refer to anything in the caller's
context, without breaking a lot of things about Python's namespacing
model.

People on the threads said that they simply want to initialize an empty list [] by a desire to avoid the None scheme.

I would rather solve those kind of issues than help to squeeze complicated logic into default parameters. But that's just my take on it looking from testing and maintenance perspective here.

Another idea that comes to my mind is that a separate object allows more in terms of the open-closed principle than a fixed syntax used for one single, hopefully best use-case. Thinking here of the call-by-name and call-by-need evaluation. About the namespacing issue: I disagree here because it is always possible to interface these kind of variables explicitly (like we do with globals, locals, builtins, etc.). So, it would be a compatible addition. Still, we talk about default parameters.

Best
Sven


* Trying that searches do not present the word "matrix multiplication"; at least not to me.


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

Reply via email to