walrus with a twist :+= or ...
Chris Angelico
rosuav at gmail.com
Wed Oct 27 21:10:58 EDT 2021
On Thu, Oct 28, 2021 at 11:58 AM Avi Gross via Python-list
<python-list at python.org> wrote:
> On a serious note, if it was ever considered a good idea, what would be an
> acceptable sequence of symbols that might not break or confuse existing
> programs and what would we call it? I mean what animal, of course.
>
>
>
> What do these look like in some fonts? :+= :-= :*= :/= :%=
>
What we need is a few more generic operators that can be put together
appropriately. For instance, when you need a copy of a list, you can
use the "robot face" operator:
stuff[:]
Perhaps we need some more slice variants. We can already grin:
stuff[
:D
]
and stick out our tongues:
stuff[
:P
]
and even gasp in surprise:
stuff[
:O
]
but the language has an emotional bias towards sadness:
stuff[
:(
)]
since there's no corresponding happiness emoji, nor even ambivalence:
stuff[
:|
]
However, a wry smile is permitted.
stuff[
:\
]
The lack of language support for such a fundamental emotion as
happiness is a major flaw and needs to be corrected ASAP.
ChrisA
More information about the Python-list
mailing list