Although it doesn't solve the issue for all cases, you can solve this particular problem by using the future
package.
As you can see here , the future
package provides its own version of builtins
for python 2 and python 3. By relying on this package instead of doing it yourself, you can import future
's implementation of builtins, thus removing the problematic code and avoiding Pycharm's (erroneous) error.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.