What are the attributes and methods such as double underscore _ _ dir__ in the Python class?

such as the title, you just want to know what the scientific names of these things are?

there is also information about where to find these method properties, because sometimes you need to rewrite these built-in methods, such as rewriting _ _ eq__, to want to know where to find relevant materials to learn.

Thank you

Mar.02,2021

search: python Magic method / Special method

python-magic-methods-guide.html" rel=" nofollow noreferrer "> http://pyzh.readthedocs.io/en.

The method of double underlining in

python is called "magic method". You can check some related introductions for yourself. This is the nickname of some commonly used https://www.jianshu.com/p/3f4.


magic method (magic method) is a special method.
in python-notes/-sharpid3" rel=" nofollow noreferrer ">" fluent Python ", the author also refers to the special method as the double-down method (dunder method).

Menu