简体   繁体   English

什么是Python中的顶级模块?

[英]what is top level module in Python?

I've met words such as top-level modules and top-level packages in Python documentation several times. 我已经多次在Python文档中遇到过诸如顶级模块和顶级软件包之类的文字。 This is the documentation about such concepts. 这是关于此类概念的文档。 What does these words mean? 这些词是什么意思?

Modules can be nested inside each other. 模块可以互相嵌套。 For example os.path is a path module nested inside os module. 例如, os.path是嵌套在os模块中的path模块。 Top level module is the topmost one. 顶级模块是最顶层的模块。 I this case, it's an os module. 在这种情况下,它是一个os模块。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM