[2.1] What is the magic function

  • In python inside, function starts with a double underline and at the end, called the magic function

  • Magic function can define the characteristics of a class, these methods are automatically invoked when performing certain operations

Guess you like

Origin www.cnblogs.com/zydeboke/p/11225663.html
Recommended