Prev Up Next
Directory Structure General Remarks Coding Guidelines

Naming Conventions

Module names are lowercase.

Functions have identifiers that are either lowercase_with_underscores or Capitalized. This is a bit of a mess, but generally the former should be preferred.

Variables, local or global, are also lowercase_with_underscores. Module internal names (for functions, variables, etc.) shouldstart with an underscore (`_') (this is a Python convention that affects import statements and module finalization).

Class names are Capitalized. Public methods are also Capitalized, protected methods are lowercase_with_underscores, private methods start with two underscores (another Python convention). Instance variables are also lowercase_with_underscores.

Constants are often UPPERCASE (an exception are the X-constants in Pax/X.py)

Python does not enforce encapsulation and the distinction between public, protected and private methods and instance variables is more or less a convention programmers are expected to adhere to.


Directory Structure General Remarks Coding Guidelines
Prev Up Next