You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
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.
lowercase, with words separated by underscores as necessary to improve readability
See this answer for the difference between a module, class and package:
A Python module is simply a Python source file, which can expose classes, functions and global variables.
A Python package is simply a directory of Python module(s).
So PEP 8 tells you that:
modules (filenames) should have short, all-lowercase names, and they can contain underscores;
packages (directories) should have short, all-lowercase names, preferably without underscores;
classes should use the CapWords convention.
PEP 8 tells that names should be short; this answer gives a good overview of what to take into account when creating variable names, which also apply to other names (for classes, packages, etc.):
Quoting https://www.python.org/dev/peps/pep-0008/#package-and-module-names:
For classes:
And function and (local) variable names should be:
See this answer for the difference between a module, class and package:
So PEP 8 tells you that:
PEP 8 tells that names should be short; this answer gives a good overview of what to take into account when creating variable names, which also apply to other names (for classes, packages, etc.):
To finish, a good overview of the naming conventions is given in the Google Python Style Guide.
The text was updated successfully, but these errors were encountered: