# HG changeset patch # User Pierre-Yves David # Date 2015-05-13 18:39:48 # Node ID 62c2786b4327ea8b6eda7c968a4207abe09f16ee # Parent 297ea0df75d0f7ab552fc8986d04c8196de8d9dd check-code: allow print and exec as a function This is required to move forward on python3 compatibility. diff --git a/contrib/check-code.py b/contrib/check-code.py --- a/contrib/check-code.py +++ b/contrib/check-code.py @@ -238,7 +238,8 @@ pypats = [ (r'class\s[^( \n]+:', "old-style class, use class foo(object)"), (r'class\s[^( \n]+\(\):', "class foo() not available in Python 2.4, use class foo(object)"), - (r'\b(%s)\(' % '|'.join(keyword.kwlist), + (r'\b(%s)\(' % '|'.join(k for k in keyword.kwlist + if k not in ('print', 'exec')), "Python keyword is not a function"), (r',]', "unneeded trailing ',' in list"), # (r'class\s[A-Z][^\(]*\((?!Exception)',