常用魔术方法:repr、str、eq、hash、len、bool、call | Python

本章覆盖:__repr__;__str__;__eq__;__hash__;__len__;__bool__;__call__。

本章知识点

  • repr
  • str
  • eq
  • hash
  • len
  • bool
  • call