Python return self

小a草

关注

阅读 90

2022-05-20

在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)

0 0 举报