我是 python 新手。我正在尝试运行以下程序:
class Temp():
def __init__(self):
print 'hello world!'
def main():
temp = Temp()
print 'here i am'
if __name__ == '__main__':
main()
我收到此错误:
Traceback (most recent call last):
File "test.py", line 1, in <module>
class Temp():
File "test.py", line 11, in Temp
main()
File "test.py", line 7, in main
temp = Temp()
为什么我收到此错误?