On Fri, Mar 14, 2014 at 8:48 PM, William Stein <wst...@gmail.com> wrote: > In retrospect, it appears that the OP should have asked the following > question: From the perspective of Sage, if Python were to have > another arithmetic operator (denoted @) with identical precedence > rules to *, would we use it for anything? Would we extend the > coercion model, etc.? Are there any algebraic structures at all that > have two different "multiplications"?
Indeed, this probably would have been the correct question, if only I'd known! But the end result is that I learned a lot about how Sage approaches things that I didn't know before, and the PEP got much stronger from getting this feedback from a perspective I hadn't understood before -- in fact I rewrote large parts of it in response to comments here and on the sympy list. Thank you very much to everyone who took the time to comment. The current status, in case anyone is curious, is that it looks like '@' will in fact appear in Python 3.5, once some details are worked out: https://github.com/numpy/numpy/pull/4351#issuecomment-37717330 If anyone here does have any opinions on those details then I'd love to hear them. > His actual > PEP had something claiming we had added something to the preparser, > but that was not a multiplication operator, but simply a backslash > shorthand for matrix inversion, like in Matlab, that nobody uses or > cares about -- I just added it one day for fun in the early days -- > based on no demand. Hmm, I don't remember saying this, and the text changed quite a bit from what I originally sent around, but if you see any remaining inaccuracies then please let me know so I can fix them! :-): http://legacy.python.org/dev/peps/pep-0465/ (In fact I know there's one inaccuracy in that version -- it says that sage & sympy don't implement elementwise multiplication at all. My local draft changes that to "Projects which currently use * for matrix multiplication, and which don't really care about elementwise multiplication at all", which I think is closer to the truth?) -n -- Nathaniel J. Smith Postdoctoral researcher - Informatics - University of Edinburgh http://vorpus.org -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.