Operator Overloading:Doing It Right

Operator overloading allows user-defined objects to interoperate with infix operators such as + and | or unary operators like - and ~ . More generally, function invocation(()), attribute access (.), and item access/slicing ([]) are also operators in Python.

 

 

 

 

 

 

 

 

 

end...

posted @ 2020-02-29 03:27  neozheng  阅读(101)  评论(0编辑  收藏  举报