[Python-ideas] [RFC] draft PEP: Dedicated infix operators for matrix multiplication and matrix power
Zachary Ware
zachary.ware+pyideas at gmail.com
Fri Mar 14 18:04:24 CET 2014
On Fri, Mar 14, 2014 at 11:20 AM, Nathaniel Smith <njs at pobox.com> wrote:
> On Fri, Mar 14, 2014 at 3:46 PM, Zachary Ware
> <zachary.ware+pyideas at gmail.com> wrote:
>> Here's a few
>> multi-character options I've come up with that I would like to see
>> shot down in flames before @/@@ are added to Python:
<snip>
> A big part of the motivation for wanting an infix operator for this
> kind of expression is that when using function syntax, the visual
> clutter from all the required parentheses makes expressions hard to
> parse by eye. [*] has this same problem of introducing visual nesting
> and making it hard to pick out which vertical shapes are actually
> grouping parens, and which are the operators. E.g., try counting how
> many sub-expressions there are in each of these expressions -- I find
> it much easier to pick out the 3 groups in the top example than in the
> bottom two. Sort of a variant of leaning toothpick syndrome...
This, plus added text for the PEP in a later message, is enough of a
fire for me :). Thank you.
I'll also admit that, again like Paul, I was reading in a proportional
font. @/@@ is significantly less bad in fixed width, but I still
don't love it. I certainly won't stand in the way if it's determined
to be the least bad option, though.
--
Zach
More information about the Python-ideas
mailing list