check-code: drop ban of 'val if cond else otherval' construct
authorPierre-Yves David <pierre-yves.david@fb.com>
Mon, 18 May 2015 16:18:18 -0500
changeset 25200 3613819fb05f
parent 25199 e78447e61624
child 25201 59d794154e8d
check-code: drop ban of 'val if cond else otherval' construct We now have access to this horrible but less bad than 'cond and val or otherval' syntax.
contrib/check-code.py
--- a/contrib/check-code.py	Mon May 18 16:30:24 2015 -0500
+++ b/contrib/check-code.py	Mon May 18 16:18:18 2015 -0500
@@ -239,7 +239,6 @@
 #    (r'in range\(', "use xrange"),
 #    (r'^\s*print\s+', "avoid using print in core and extensions"),
     (r'[\x80-\xff]', "non-ASCII character literal"),
-    (r'if\s.*\selse', "if ... else form not available in Python 2.4"),
     (r'^\s*(%s)\s\s' % '|'.join(keyword.kwlist),
      "gratuitous whitespace after Python keyword"),
     (r'([\(\[][ \t]\S)|(\S[ \t][\)\]])', "gratuitous whitespace in () or []"),