我是python的新手。我Syntax Error: invalid syntax & object module is not callable
目標模塊不可調用,常量上的語法無效
感謝您的幫助
Spot.py
class Spot(object):
isBunny = bool()
UP = 0
SLEEP = 2
def __init__(self, newIsBunny):
self.isBunny = newIsBunny
self.nextCycle = self.UP
Test.py
import Spot
i=2
if i==Spot.SLEEP
a=Spot(True)
print a.isBunny
錯誤說明全部..... – avasal
請給出整個堆棧跟蹤。 – Marcin