Bound Method和Unbound Method 在Python中,当对作为属性的函数进行引用时,会有两种形式,一种称为Bound Method,这种形式是通过类的实例对象进行属性引用,而另一种则是通过类进行属性引用,称为Unbound Method.当然,对Bound Method和Unbound Method的调用形式是不同的,其原因可以追溯到LOAD_ATTR中 demo2.py class A(object): def g(self, value): self.value = va…