[Tutor] Understanding Object oriented programming with Python

Manprit Singh manpritsinghece at gmail.com
Sat Sep 5 00:06:12 EDT 2020


Dear Alan sir,

Thank you for your replies for each and every email that I have written to
the python tutor mailing list in the past. In this mail about object
oriented programming, your reply has triggered a lot of points in my mind,
and hence I would prefer to write short emails with example code for each
of the new questions.

So my first question is about writing class names . if i have to define a
class "amplifier" i should write it as :

class Amplifier:              # The first character of the classname "A" is
capital
    pass

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

Regards
Manprit Singh


More information about the Tutor mailing list