[Tutor] Understanding Object oriented programming with Python
Peter Otten
__peter__ at web.de
Sat Sep 5 05:04:34 EDT 2020
Manprit Singh wrote:
> secondarily if i have to define a class,with a class name like
> "twostageamplifier". The definition could be written as given below:
> Class name is made up of 3 words "two", "stage", "amplifier".
>
> class TwoStageAmplifier: # Using CapWords convention.
> pass
That's what PEP 8, the style guide for Python code /in/ /the/ /standard/
/library/, recommends:
https://www.python.org/dev/peps/pep-0008/#class-names
If you want to follow these conventions in your own code a style guide
checker like
https://pypi.org/project/pycodestyle/
may be helpful.
More information about the Tutor
mailing list