C0325
Message
Unnecessary parens after %r keyword
Description
Used when the expression after one of the following keywords is surrounded by parenthesis: assert, del, elif, except, for, if, in, not, raise, return, while, yield. In addition, for Python 2.x: print.
This message belongs to the format checker.
Explanation
Parenthesis around such expressions were not necessary in Python 2.x and were suggested to not be used, for simplicity. Python is not C or Java.
In light of Python 2 deprication this is sometimes not wanted even in Python 2 code as it's already possible to write Python 3 syntax.
See this discussion on github: https://github.com/PyCQA/pylint/issues/20
This one can be turned of with the argument:
--ignore-superfluous-parens
Note that "parens" is short for "parentheses", the plural of "parenthesis".
Expressions cannot be "surrounded" by a single parenthesis, only by a pair of parentheses.
("Parenthesis" is pronounced "pah - wren - thuh - siss"; "parentheses" is pronounced "pah - wren - thuh - seas".)
I have a python program I'd like to be able to run on both python2 and python3. All my print statements use parens, so they are forward and backward compatible. I'd like to turn off C0325, but just for 'print' statements. Is that possible?
In C and Java things are deprecated.