On Tue, Mar 18, 2014 at 12:54 AM, Nathaniel Smith <n...@pobox.com> wrote: > On Sat, Mar 15, 2014 at 6:28 PM, Nathaniel Smith <n...@pobox.com> wrote: >> Mathematica: instead of having an associativity, a @ b @ c gets >> converted into mdot([a, b, c]) > > So, I've been thinking about this (thanks to @rfateman for pointing it > out), and wondering if Mathematica's approach is worth following up > more. (It would need to make it past python-dev, of course, but worst > case is just that they say no and we're back where we are now, so we > might as well think it through.)
I predict with near-certainty that this will be rejected, but that doesn't prevent it from derailing the discussion. This proposal is unlike anything else in Python. Chained comparisons are *not* similar to this proposal. The chaining only happens at the syntax level, not the semantics. `a < b < c` gets compiled down to `a.__lt__(b) and b.__lt__(c)`, not `do_comparison([a, b, c], [lt, lt])`. We have approval for a binary @ operator. Take the win. -- Robert Kern _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion