Naming Conventions

Python documentation gives guidelines for naming the various entities in your program code.

The variables are declared all lowercase with words separated by underscores as necessary to improve readability.

For example: integer_variable, float_variable, complex_variable

Constants are defined on a module and written in all capital letters proceeding with an underscore separating words if necessary.

For example: MAX_OVERFLOW, PI.

The naming conventions for other entities as specified in the Python documentation is given here. Use this as reference when you code in Python. For a detail documentation, visit Python doc.

Package and Module Names:

Python packages and modules should have short, all-lowercase names. While package names should not contain an underscore, an underscore may be used in module names to improve readability.

For example: Sunita, add this.

Class Names:

In Python, class names use the CapWord convention.

For example: HelloWorld.

Type Variable Names:

Names of a type variable should normally use CapWords. Preferring short names like T, AnyStr, Num and so on.


Complete and Continue