Python notes (3)

xiaoxiao2021-03-06  35

Operator overload in Python

01 Class X: 02 Def __iadd __ (self): 03 SELF.D1 = another.d104

Return Self fourth line is important, otherwise x = y will be None

转载请注明原文地址:https://www.9cbs.com/read-75871.html

New Post(0)