Python Indentation Error When There Is No Indent Error
Is it me or the interpreter? I see no indentation error in my code but it kept telling me that there is an error! I use auto indentation so it should be ok. When ever there is an i
Solution 1:
Your tabs and spaces must be getting mixed up. Set you editor to 4 spaces for a tab. You can also turn on whitespace indicator on the editor, which can help resolving the indentation errors.
Solution 2:
Your class should look like this:
classLogicGate:
def__init__(self, n):
self.label = n
self.output = NonedefgetLabel(self):
return self.label
defgetOutput(self):
self.output = self.performGateLogic()
return self.output
Post a Comment for "Python Indentation Error When There Is No Indent Error"