我是python的新手。我有一个错误
while not cls.isFilled(row,col,myMap):
TypeError: 'bool' object is not callable
请您指导如何解决这个问题?第一个“if”检查很好,但“while not”有这个错误。
def main(cls, args):
...
if cls.isFilled(row,col,myMap):
numCycles = 0
while not cls.isFilled(row,col,myMap):
numCycles += 1
def isFilled(cls,row,col,myMap):
cls.isFilled = True
## for-while
i = 0
while i < row:
## for-while
j = 0
while j < col:
if not myMap[i][j].getIsActive():
cls.isFilled = False
j += 1
i += 1
return cls.isFilled