小编Chr*_*ong的帖子

Python中的Tab错误

以下python代码抛出此错误消息,我不知道为什么,我的选项卡似乎排成一行:

File "test.py", line 12
    pass
       ^ TabError: inconsistent use of tabs and spaces in indentation
Run Code Online (Sandbox Code Playgroud)

我的代码:

class eightPuzzle(StateSpace):
    StateSpace.n = 0

    def __init__(self, action, gval, state, parent = None):
        StateSpace.__init__(self, action, gval, parent)
        self.state = state

    def successors(self) :
        pass
Run Code Online (Sandbox Code Playgroud)

python indentation python-3.x

1
推荐指数
1
解决办法
3万
查看次数

标签 统计

indentation ×1

python ×1

python-3.x ×1