PyCharm 中的 Python3 语法 [英] Python3 syntax in PyCharm
本文介绍了PyCharm 中的 Python3 语法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在 PyCharm 2016.2 中使用 python3 语法,并将解释器配置为使用 python3.5.代码在我执行时运行良好,但 PyCharm 抱怨 python2 不支持 python3 语法.
I would like to use python3 syntax in PyCharm 2016.2 and have configured the interpreter to use python3.5. The code runs fine when I execute it but PyCharm complains about python3 syntax that isn't supported in python2.
如何让 PyCharm 相信 python3 语法没问题?
How can I convince PyCharm that the python3 syntax is ok?
推荐答案
设置->编辑器->检查->Python->代码兼容性检查
Settings -> Editor -> Inspections -> Python -> Code compatibility inspection
完全禁用它或取消选择 Python 2.X
Either disable it entirely or unselect Python 2.X
这篇关于PyCharm 中的 Python3 语法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文