On Wed, Oct 13, 2021 at 9:15 AM Jeremiah Vivian
<nohackingofkrow...@gmail.com> wrote:
>
> Using the caret as a prefix unary operator would require changes in python 
> grammar. For now, stick to implementing existing operators. But the rest of 
> the ideas are good though.
>

You may need to get your sensors tuned up, as not one of those ideas
was intended to be taken seriously.

We do not need to find meanings for every operator, especially not
completely arbitrary ones. Mathematicians and programmers both extend
operators to new meanings, but only where it makes sense. For
instance, you might interpret multiplication as repeated addition ("3
times 5 means 5 plus 5 plus 5"), and then logically interpret
string-times-integer multiplication the same way ("3 times spam means
spam plus spam plus spam"), and Python indeed agrees with that:

>>> 3 * "spam"
'spamspamspam'

But if you can't justify it with something like that, then it's
usually a bad idea. Unary plus meaning ord() has no justification from
mathematics or other parts of Python (or, if it does, I haven't heard
them), so it doesn't give any reason for being.

Of course, it's also possible that your entire thread here is *itself*
a parody, in which case, I apologise for not noticing it.

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

Reply via email to