Python スクリプトを使用していますが、次のエラーが表示されます。
Traceback (most recent call last):
File "C:\Users\Tim\Desktop\pop-erp\test.py", line 1, in <module>
s = Something()
NameError: name 'Something' is not defined
問題を引き起こすコードは次のとおりです。
s = Something()
s.out()
class Something:
def out():
print("it works")
これは、Windows 7 x86-64 の下で Python 3.3.0 で実行されています。
Something
クラスが見つからないのはなぜですか?