On 06/03/2023 15:49, Stephen J. Turnbull wrote:
Steven D'Aprano writes:
  > I like the look of the & operator for concatenation, so I want to like
  > this proposal. But I think I will need to see real world code to
  > understand when it would be useful.

I have to second that motion.  Pretty much any time I'm constructing
lines containing variable text, each string value arrives stripped and
I far more often want padding of variable width values rather than
space compression.
Understood.  But perhaps in (the tiny minority? of) cases where you *don't* want padding, you would like single space separators? 😁 Perhaps where you're not laying out a table, but constructing a human-readable string?  So
    s1 + ' ' + s2 + ' ' + s3
or
    ' '.join((s1, s3, s3))
would become
    s1 & s2 & s3
saving you a bit of typing.  Just sayin'.
Best wishes
Rob Cliffe

I admit that I use M-SPC (aka just-one-space) lot in Emacsen, but I
can't recall wanting it in a program in any language.
_______________________________________________
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/DZXQJ4GQTDEEMOO6VX4VJE45ZN7XNMR4/
Code of Conduct: http://python.org/psf/codeofconduct/

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

Reply via email to