Request for help on naming conventions

Benjamin Niemann pink at
Mon Jun 13 14:28:47 CEST 2005

Steven D'Aprano wrote:

> Are there any useful naming conventions for modules, classes and
> functions?
> For instance, should I name functions as verbs and classes as nouns?
> eg
> class Transformer():
>     pass
> def transform():
>     do_stuff
> What about the module name? or
You probably want to read the PEP 8, "Style Guide for Python Code":

> What do people do with their own code? Do folks find that being
> consistent helps them remember what is what, or do you name objects
> whatever feels right at the time?
Naming convention are mostly a matter of personal taste (unless you are
working in a larger team, where there are some official conventions that
must be followed). So I would say the 'feels right' is the most important

Benjamin Niemann
Email: pink at odahoda dot de

More information about the Python-list mailing list