Operator precedence table questions
rosuav at gmail.com
Sun Feb 16 01:43:11 CET 2014
On Sun, Feb 16, 2014 at 11:30 AM, Ned Batchelder <ned at nedbatchelder.com> wrote:
> On 2/15/14 7:18 PM, Chris Angelico wrote:
>> Operators in the same box group left to right (except for comparisons,
>> including tests, which all have the same precedence and chain from
>> left to right...)
>> Comparisons, including tests, are all in the same box. Grammatically,
>> this wording puzzles me. Everything groups L->R except these, which
>> group L->R?
> I think the "except" is referring to "group" vs. "chain". Comparison
> operators don't group left to right, they chain left to right:
Oh, right... duh. Somehow my eye glossed right over that as though the
two words were synonymous. Thanks.
More information about the Python-list