On Mon, Mar 17, 2014 at 10:33 PM, Christophe Bal <projet...@gmail.com> wrote: > I think that weak-left is a little strange, just think a little of the > operators used by mathematicians that always follow a hierarchy.
Not sure what you mean -- I don't think most mathematicians think that scalar and matrix multiplication are above or below each other in precedence, for example. (Well, it's a strange question because scalar multiplication commutes, but even so, people often forget that these are even different operations.) > A parser is mostly done using grammars : see > http://docs.python.org/3.1/reference/grammar.html. > > Defining *-product to have stronger priority than the @-product, and this > last having stronger priority than +, will make the changes in the grammar > easier. > > I'm now convinced of the usefulness of @ and @@ too but I also think that > you must think of other uses than only for numpy. In other words, numpy is a > the good argument for this new operators, but this can also open new > perspectives for other uses. No, that's not how this game is played :-). The way it works is, we figure out the best possible way to handle the use case that we've demonstrated a need for (matrix multiplication), and then once we've done that someone might or might not find some other uses too. If they do then cool, if not then too bad. This follows the principle that it's better to be great at some things than to be mediocre at everything. -- Nathaniel J. Smith Postdoctoral researcher - Informatics - University of Edinburgh http://vorpus.org _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion