check-code: allow print and exec as a function
This is required to move forward on python3 compatibility.
--- a/contrib/check-code.py Wed May 06 15:58:14 2015 -0700
+++ b/contrib/check-code.py Wed May 13 11:39:48 2015 -0700
@@ -238,7 +238,8 @@
(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)',