TypeError: unbound method two() must be called with B instance as first argument (got nothing instead)I am class为什么Python2不保留@staticmethod,并且有解决办法?编辑:从一个类中删除两个(并保留@staticmethod)似乎有效,但这对我来说还是很奇怪的。
我目前有一个类系统,它注册回调,然后在满足某些条件时调用它们。但是,我在存储函数对象时遇到了一些问题。unbound method Bar() must be called with Foo instance as first argument (got nothing instead)
当函数不是Foo的成员时当将它添加到列表中时,它的功能有哪些不同。