Unnecessary parens after %r keyword


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.


Parenthesis around such expressions are not necessary in Python and should not be used, for simplicity. Python is not C or Java.

Add a New Comment
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License