On Sun, Apr 19, 2020 at 01:24:14AM +1000, Chris Angelico wrote:

[...]
> Alex referred to refactoring "text that looks like an expression", and
> on that point, I absolutely agree with Steven here: there are MANY
> places where "text that looks like an expression" can have vastly
> different meanings in different contexts.

[...]
> So I think that the false parallel here IS a strike against the proposal.

I don't deny it. I just hope people can understand that language design 
should not be "one strike and you're out". Sometimes compromises are 
needed.

It would be good if we had something that was neither excessive verbose 
nor painfully terse, required nothing but ASCII, that was similar enough 
to dict unpacking to suggest a connection, but without being confusable 
to anything else even to newbies, was self-descriptive without needing 
much or any explanation, cured Covid-19, brought peace to the Middle 
East, ended poverty, and improved the level of political discourse on 
social media.

But I fear we may have to relax the requirements somewhat :-)

My requirements for this syntax are:

- it's a form of dict unpacking, so it ought to use `**` rather than 
  overloading some other, unrelated, symbol like (say) `@` or `%`;

- it ought to use a simple list of identifiers without needing extra
  sigils or markers on each one, say:

  `meta, dunder, private`

  rather than 

  `:meta, :dunder, :private` or `meta=, dunder=, private=`
  
- it ought to be something "like" an expression, rather than a mode
  that has to be turned on and then applies to the end of the function 
  call;

- if it actually is an expression, that's a nice bonus, but it's
  not essential;

- it ought to look Pythonic, which is subjective;

- or at least not look like "line noise", which is still subjective 
  but it's probably easier to get agreement on what is ugly than on 
  what is beautiful :-)


It is a lot to ask.

If anyone else can think of an alternative, please do speak up!



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

Reply via email to