
Sign up to save your podcasts
Or


本期中的问题可在这里找到:
01:49:40 关于「unbound method 在 Python 3 中为什么会取消」的讨论。
关于 unbound method 取消的原因,我没找到官方的解释,很多人说是为了简化语言,因为区分 function 和 unbound method 意义不大。然后我们关于 @staticmethod 那里说错了。@staticmethod 在 Python 3 里还是需要的,因为只有你在 MyClass.some_method 才是和 @staticmethod 等价,然而很多时候我们需要在 instance 上调用,这时候还是需要 @staticmethod。
[16]: https://www.python.org/dev/peps/pep-0572/
爱发电上赞助
By pythonhunter4.3
2929 ratings
本期中的问题可在这里找到:
01:49:40 关于「unbound method 在 Python 3 中为什么会取消」的讨论。
关于 unbound method 取消的原因,我没找到官方的解释,很多人说是为了简化语言,因为区分 function 和 unbound method 意义不大。然后我们关于 @staticmethod 那里说错了。@staticmethod 在 Python 3 里还是需要的,因为只有你在 MyClass.some_method 才是和 @staticmethod 等价,然而很多时候我们需要在 instance 上调用,这时候还是需要 @staticmethod。
[16]: https://www.python.org/dev/peps/pep-0572/
爱发电上赞助

113 Listeners

325 Listeners

45 Listeners

471 Listeners

174 Listeners

25 Listeners

197 Listeners

56 Listeners

206 Listeners

35 Listeners

292 Listeners

323 Listeners

52 Listeners

46 Listeners

3 Listeners