正在加载图片...
Dot Expressions Python Tutor link You can access class or instance attributes with dot notation. <expression>.<name> The <expression>can be any valid Python expression that evaluates to a class or instance.The <name>must be an attribute or a method. tiff_account.max_withdrawal To evaluate a dot expression: 1.Evaluate the <expression>to the left of the dot,which yields the object of the dot expression 2.<name>is matched against the instance attributes of that object; if an attribute with that name exists,its value is returned 3.If not,<name>is looked up in the class,which yields a class attribute or a method 4.The corresponding attribute is returned or corresponding method is calledDot Expressions You can access class or instance attributes with dot notation. The <expression> can be any valid Python expression that evaluates to a class or instance. The <name> must be an attribute or a method. To evaluate a dot expression: 1. Evaluate the <expression> to the left of the dot, which yields the object of the dot expression 2. <name> is matched against the instance attributes of that object; if an attribute with that name exists, its value is returned 3. If not, <name> is looked up in the class, which yields a class attribute or a method 4. The corresponding attribute is returned or corresponding method is called Python Tutor link <expression>.<name> tiff_account.max_withdrawal
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有