[Numpy-discussion] Resolving the associativity/precedence debate for @

Eric Firing efiring at hawaii.edu
Sat Mar 22 14:56:54 EDT 2014


On 2014/03/22 8:13 AM, Nathaniel Smith wrote:
> Hi all,
>
> After 88 emails we don't have a conclusion in the other thread (see
> [1] for background). But we have to come to some conclusion or another
> if we want @ to exist:-). So I'll summarize where the discussion
> stands and let's see if we can find some way to resolve this.

In case a "vote" from a previously "non-voting" reader helps:

I think the case for same-left, as you state it, is strong; it's simple 
and easy to remember, and *this* *matters*. A *strong* argument would be 
needed to override this consideration, and I haven't seen any such 
strong argument.  The basic advice to users is: be explicit--use 
parentheses as needed to show both the interpreter and readers of your 
code how you want the expression to be evaluated.  Relying on precedence 
and associativity works only when the rules are well established by 
convention, and the expression is quite simple.

Eric



More information about the NumPy-Discussion mailing list