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

Robert Kern robert.kern at gmail.com
Fri Mar 14 17:46:27 CET 2014


On 2014-03-14 16:39, Nathan Schneider wrote:

> In Courier New:
>
>      S = (H @ beta - r).T @ inv(H @ V @ H.T) @ (H @ beta - r)
>
> Still looks kind of bulky to me, because @ is the height and width of a capital
> letter. How about prefixing * with an innocuous backtick?
>
>      S = (H `* beta - r).T `* inv(H `* V `* H.T) `* (H `* beta - r)
>
> That way no part of the operator extends to the baseline, so identifiers and
> parentheses/brackets are visually well-separated from this as they are with most
> other binary operators.

Fails the grit-on-Tim's-monitor test, or at least the grit-on-Robert's-monitor test.

-- 
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



More information about the Python-ideas mailing list