魔法函数(Magic methods),也被称为特殊方法(Special methods)或双下划线方法(Dunder methods),是Python中的一种特殊的方法。它们以双下划线开头和结尾,例如
__init__
__str__
__repr__等。