赞
踩
I have a python script and I am receiving the following error: Traceback (most recent call last): File "C:\Users\Tim\Desktop\pop-erp\test.py", line 1, in s = Something() NameError: name 'Something' is not defined
Here is the code that causes the problem: s = Something() s.out() class Something: def out(): print("it works")
This is being run with Python 3.3.0 under Windows 7 x86-64.
Why can't the Something class be found?
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。