Writing cross-compatible python2/python3 code in pycharm
<p>I've taken care to make sure library works on both python2 and python3, but pycharm adds some vexatious red squiggles as seen below </p>

<p><a href="http://i.stack.imgur.com/EBCpC.png"><img src="http://i.stack.imgur.com/EBCpC.png" alt="enter image description here"></a></p>

<p>If I switch the project interpreter to python 3.5 instead, the nag just moves onto the other import.  <strong>Which inspection is this?  I want to turn it off.</strong>  </p>

<p>Although it doesn't solve the issue for all cases, you can solve this particular problem by using the <code>future</code> package.</p>

<p>As you can see <a href="http://python-future.org/imports.html#imports-of-builtins">here</a>, the <code>future</code> package provides its own version of <code>builtins</code> for python 2 and python 3.  By relying on this package instead of doing it yourself, you can import <code>future</code>'s implementation of builtins, thus removing the problematic code and avoiding Pycharm's (erroneous) error.</p>

python pycharm