0
点赞
收藏
分享

微信扫一扫

Python return self

小a草 2022-05-20 阅读 90

在Python中,return self的作用为:

Returning self from a method simply means that your method returns a reference to the instance object on which it was called. This can sometimes be seen in use with object oriented APIs that are designed as a fluent interface that encourages method cascading.

链式调用




举报

相关推荐

0 条评论