Conventions - paua-app/PyBalone GitHub Wiki

Conventions

Naming convention

Names begin with a lower case letter and are written in camel-case, meaning every subword begins with a upper case letter, e.g. calculateAbsolutePlayerPosition().

Private fields in classes

There is the single-underscore-way of creating non-public members, but thats a rather weak one and is mainly used on imports. We use the strong one with two underscores (e.g. __playerPosition) that implements a private member of a class.

Documentation

To create comments we use PEP 257 to write documentation comments, so something like this:

def setBackgroundColor(self, color):
  """
  Sets the new background color and directly applies it to the surface.
  Arguments:
  color -- The new color of the window.
  """

##Using Language We using english as language in our code