diff --git a/porting-code-to-python-3-with-2to3.html b/porting-code-to-python-3-with-2to3.html index 5290ddf..cbc611e 100644 --- a/porting-code-to-python-3-with-2to3.html +++ b/porting-code-to-python-3-with-2to3.html @@ -159,7 +159,7 @@ td pre{padding:0;border:0}
  1. The simplest form.
  2. The or operator takes precedence over the in operator, so there is no need for parentheses here. -
  3. On the other hand, you do need parentheses here, for the same reason — or takes precedence over in. +
  4. On the other hand, you do need parentheses here, for the same reason — or takes precedence over in. (Note: this code is completely different from the previous line. Python interprets x or y first, which results in either x (if x is true in a boolean context) or y. Then it takes that singular value and checks whether it is a key in a_dictionary.)
  5. The in operator takes precedence over the + operator, so this form technically doesn’t need parentheses, but 2to3 includes them anyway.
  6. This form definitely needs parentheses, since the in operator takes precedence over the + operator.