Python Conventions

This page discusses various conventions for the Python Interface.

Naming Conventions

 * Classes begin with an upper-case letter (e.g. )
 * Variables and methods begin with a lower-case letter
 * We use camelCase in the Python world and underscore_style in the C World.
 * What about module names?
 * Abbreviations are uncapitalized. E.g.: debyeHueckel.setRcut
 * Methods generally start with a verb that describes what the method does (e.g. )
 * We use names of the algorithms instead of the intended physics
 * e.g. CoulombP3M instead of Electrostatics
 * + Emphasizes that cannot be used as a black box, as a user needs to know what an algorithm does
 * + Allows to use the algorithm in other contexts
 * + Allows to use alternative algorithms for the intended physics (Multigrid instead of P3M)
 * The names should be as specific as the method
 * + Allows to use alternative algorithms for a purpose

Coding Conventions

 * Indentation level is *4 spaces*, no tabs nothing.
 * Vi users may use set shiftwidth=4 to make that easier.

Other stuff

 * We use standard python exceptions (at the moment)