Python中函数(Function)和方法(Method)的区别

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/lvlinfeng970/article/details/81838002

参考资料

https://blog.csdn.net/bin_zlfb/article/details/60874084

https://blog.csdn.net/amoscn/article/details/77074403

简单总结:

  1. 与类和实例无绑定关系的function都属于函数(function);
  2. 与类和实例有绑定关系的function都属于方法(method)。

猜你喜欢

转载自blog.csdn.net/lvlinfeng970/article/details/81838002