On 2015-11-14 22:53, Random832 wrote:
Marko Rauhamaa <ma...@pacujo.net> writes:
Actually, the real question is, is the unary - *really* so useful that
it merits existence or is it just something that was mindlessly copied
into programming languages from elementary school arithmetics?

The alternative, if you want to be able to specify negative numbers at
all, is to put - in the literal syntax. So what's "x-1"?

I suppose you could use some *different* symbol in the literal syntax
for negative numbers. I had a calculator once that used a different
symbol (looked like a small superscript minus sign) for it. But Python
is limited to ASCII for basic syntax elements for good reasons.

APL uses "¯" ('\N{MACRON}'), e.g. "¯1".

--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to