[Python-ideas] [RFC] draft PEP: Dedicated infix operators for matrix multiplication and matrix power

Guido van Rossum guido at python.org
Fri Mar 14 15:49:40 CET 2014


Where on earth is the degree sign on my keyboard? (Don't answer. It's a
rhetorical question.)


On Fri, Mar 14, 2014 at 7:44 AM, Robert Kern <robert.kern at gmail.com> wrote:

> On 2014-03-14 13:20, M.-A. Lemburg wrote:
>
>> On 14.03.2014 12:25, Robert Kern wrote:
>>
>>> On 2014-03-14 10:16, M.-A. Lemburg wrote:
>>>
>>>  I have some questions:
>>>>
>>>> 1. Since in math, the operator is usually spelt "·" (the center dot,
>>>>      or "." but that's already reserved for methods and attributes in
>>>>      Python), why not try to use that instead of "@" (which in Python
>>>>      already identifies decorators) ?
>>>>
>>>
>>> I think the current feeling of the Python core team is against including
>>> non-ASCII characters in the
>>> language's keywords or operators. Even if that were not so, I would
>>> still recommend against it
>>> because it would be quite difficult to type. I don't know off-hand the
>>> key combination to do it on
>>> my native system, and it would change from system to system.
>>>
>>
>> That's a fair argument. How about using the degree symbol instead: "°" ?
>>
>> (A ° B).T == B.T ° A.T
>>
>
> Your point is taken, though. I do find these smaller symbols more readable
> and similar to standard mathematical notation than an @ sign, which is as
> big or bigger than most uppercase characters. Unfortunately, ASCII leaves
> us few single-character options.
>
>
> --
> Robert Kern
>
> "I have come to believe that the whole world is an enigma, a harmless
> enigma
>  that is made terrible by our own mad attempt to interpret it as though it
> had
>  an underlying truth."
>   -- Umberto Eco
>
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/
>



-- 
--Guido van Rossum (python.org/~guido)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20140314/0971552f/attachment.html>


More information about the Python-ideas mailing list