我想知道如何从我的“公式”类访问“eq”功能?我所尝试过的不起作用并返回“未绑定的方法”。谢谢。从Python中的类访问函数?
class formula():
def eq():
print "What is your Velocity: "
v = float(raw_input())
print "What is your Intial Velocity: "
u = float(raw_input())
print "What is the time: "
t = float(raw_input())
aa = v-u
answer = aa/t
print "Your Acceleration is: ", answer
a =formula.eq()
print a
[在Python静态方法](http://stackoverflow.com/questions/735975/static-methods-in- python) – gongzhitaao
为什么'公式'中的'eq'完全在?看起来它属于模块级别。 – user2357112