I try to follow the style guide for the Python code (also known as). Accordingly, the preferred way of giving a class name is using Camel Seas:
Almost without exception, class names,
The name of the class is made by two equations (which should be capitalized in proper English), so how can I be compatible with PEP 8? For example, if my class name was 'NASA JPL', then what would you name it ?:
class NASAJPL (): # 1 class NASA_JPL (): # 2 class non-generic ( ): # 3
I am using # 1, but it looks strange; # 3 looks too awkward, and # 2 seems to violate PEP 8.
Thoughts?
EDIT:
Many thanks for your answer, while in reality the question is not 'right' answer, so I gained a lot from your insights.
I will resort to a # 3: in the spirit of being in the form of a short code / short name as a title
incompatible ) would be better.
Thanks again.
It covers (at least partially):
< P> Note: When using abbreviations in captions, capitalize all the letters of the abbreviation. ThusHTTPServerError
HttpServerError
.
, which means I read that NASAJPL ()
is recommended as per PEP-8
personally NASAZAPLE ()
will be found because the upper case letters are easily marked by the boundaries and the name is given a specific size.
Comments
Post a Comment