Modules should have short, all-lowercase names. Underscores can be used in the module name if it improves readability. Python packages should also have short, all-lowercase names, although the use of underscores is discouraged.
此外,另一个国家指出:
single_trailing_underscore_: used by convention to avoid conflicts with Python keyword, e.g.:
关于模块名称的PEP-8指南规定:
此外,另一个国家指出:
。。。这正是你这么做的原因,而不仅仅是为了好玩。 因此,即使它没有明确地作为模块的命名准则,我假设我们可以将其适应所有Python命名约定。所以我认为你可以走了
模块(文件名)应该有短的、全小写的名称,并且可以包含下划线
Pep8文档,所以您可以:)
相关问题 更多 >
编程相关推荐