Style guide¶
Variable naming¶
Use
UPPERCASEnames for module-level constants, or class-level attributes.Use
lowercasenames for module-level variables, or instance-level attributes, or methods in general.Use names prefixed by an underscore
_for protected attributes, both class-level and instance-level.Suffix
Enumsubclasses and ClassEnum with...Enum.Todo
This runs counter to Python’s intended naming scheme, where
...Enumimplies that something is an enum metaclass.Maybe it could be changed?
Suffix ClassMemberBase with
...Base.
Todo
Decide on when to use Pack... and World... prefixes, and when to avoid them.
Module organization¶
Todo
Fully develop the hierarchy describing which classes go where with no ambiguity.
Documentation¶
Follow the Python Developer’s Guide for documenting sections.
Either use
:caption:to document the context of.. code-block, or, alternatively, wrap it in a.. admonition:: Exampleif applicable.