Characters in arithmetic expressions (was: semantics of ** (unexpected/inconsistent?))

Ben Finney ben+python at
Mon Nov 30 23:07:30 CET 2009

MRAB <python at> writes:

> Most programming languages don't differentiate in text between the
> number "negative 3" and the expression "negated 3". APL does. The
> former is written as "¯3" (3 preceded by the overscore character) and
> the latter as "-3" (3 preceded by the minus sign).

Well, since we're talking about special characters: the ‘-’ that we find
on our keyboard is a hyphen (U+002D). A minus sign is ‘−’ (U+2212) and
is unlikely to be found on the keyboard unless it's a keyboard designed
specifically for APL :-)

 \       “A ‘No’ uttered from deepest conviction is better and greater |
  `\       than a ‘Yes’ merely uttered to please, or what is worse, to |
_o__)                                  avoid trouble.” —Mahatma Gandhi |
Ben Finney

More information about the Python-list mailing list