python- parametric - (4) (getattr, property class property called function call)

1.getattr

getattr(object, name[, default])
  • object - the object.
  • name - String object properties.
  • default - default return value, if the parameter is not available, when there is no corresponding attribute triggers AttributeError.

 

 

 

2.property

Similarly instance method is invoked, as follows:

 

 

Guess you like

Origin www.cnblogs.com/newsss/p/12151173.html