私は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()
なぜこのエラーが発生するのですか?