pylint says "Unnecessary parens after %r keyword"
Question: After my [first CodeReview
Q](http://codereview.stackexchange.com/questions/61798/mysql-class-to-add-
user-database) \- I got tip in answer:

> Your code appears to be for Python 2.x. To be a bit more ready for a
> possible future migration to Python 3.x, I recommend to start writing your
> print ... statements as print(...)

Thus, in my following code (I'm using Python 2.6 and 2.7 on my boxes) I always
us `()` for `print`:

    
    
    print('Hello')
    

Today I first time test my code with PyLint, and it says:

> C: 43, 0: Unnecessary parens after 'print' keyword (superfluous-parens)

Which explained [here](http://pylint-messages.wikidot.com/messages:c0325).

So - does `print(str)` is really incorrect, or I can disregard this PyLint
messages?


Answer: To make pylint aware that you want to use the new print statement and not put
erroneous brackets simply use

    
    
    from __future__ import print_function
    

at the beginning of your script. This has also the advantage that you
**always** need to use `print(...)` instead of `print ...`. Accordingly, your
program will throw a `SyntaxError` in case you fall back to the old syntax.

Be aware that this does not work in python 2.5 or older. But since you use 2.6
and 2.7, there should be no problem.

