In article <87eingrbh9....@benfinney.id.au>, Ben Finney <ben+pyt...@benfinney.id.au> wrote: >Lie Ryan <lie.1...@gmail.com> writes: > >> I generally do not expect operator precedence to be reliable at all > >Have another read of the thread. The OP's confusion was not over >operator precedence, but over how names resolve to values in >expressions.
Operator precedence comes naturally into this matter. For example, in algol 68 -3**2 is parsed as (-3)**2 because of the simple rule that all unary operators have precedence over all binary operators. (It is a good rule, and this is about the only way to get a somewhat surprising result. Unary operators -- as long as they are always put up front -- need not have a precedence among themselves, so with this rule they don't need a precedence full stop. ) >Ben Finney Groetjes Albert -- -- Albert van der Horst, UTRECHT,THE NETHERLANDS Economic growth -- being exponential -- ultimately falters. alb...@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst -- http://mail.python.org/mailman/listinfo/python-list