[Python-ideas] [RFC] draft PEP: Dedicated infix operators for matrix multiplication and matrix power
Antoine Pitrou
solipsis at pitrou.net
Fri Mar 14 18:08:11 CET 2014
On Fri, 14 Mar 2014 16:46:27 +0000
Robert Kern <robert.kern at gmail.com> wrote:
> 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.
Not only grit, but the problem with the backtick is that it can look
very close to a straight apostrophe.
I am personally not fond of @, but I find it ok in that it is
distinctive enough without being terribly ugly.
Regards
Antoine.
More information about the Python-ideas
mailing list