Python "Attribute" Definition

来源:互联网 发布:淘宝上的中药能买吗 编辑:程序博客网 时间:2024/06/07 19:28
By the way, I use the word attribute for any name following a dot — for example, in the expression z.realreal is an attribute of the objectz. Strictly speaking, references to names in modules are attribute references: in the expression modname.funcnamemodname is a module object and funcname is an attribute of it. In this case there happens to be a straightforward mapping between the module’s attributes and the global names defined in the module: they share the same namespace! [1]
0 0
原创粉丝点击