[英]How to execute inconsistent use of tabs and spaces in indentation? | PYTHON
I have a specific code (for example)我有一个特定的代码(例如)
def beginmain():
print('hello world')
beginmain()
Everything works correctly, but I want to execute the TabError (inconsistent use of tabs and spaces in indentation).一切正常,但我想执行 TabError(缩进中制表符和空格的使用不一致)。 How do I make it?
我该怎么做?
Which IDE do you use?您使用哪个 IDE?
For example, in the settings of PyCharm, you can arrange if it accepts 4 spaces as tab or not.例如,在PyCharm的设置中,你可以安排它是否接受4个空格作为制表符。 If you choose not and use 4 spaces it gives that error message.
如果您不选择并使用 4 个空格,则会显示该错误消息。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.