Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

If my python class name has an acronym, should I keep it upper case, or only the first letter? [closed]

I have a class named SSLXMLRPCServer. Should it be that or SslXmlRpcServer?

like image 524
gregturn Avatar asked Sep 10 '10 22:09

gregturn


People also ask

Should acronyms be capitalized in variable names?

Consistently capitalize acronyms in camel-case API parameters, variables, etc.

Should acronyms be capitalized in camel case?

The camelCasing convention, used only for parameter names, capitalizes the first character of each word except the first word, as shown in the following examples. As the example also shows, two-letter acronyms that begin a camel-cased identifier are both lowercase.

Should of be capitalized in an acronym?

Some abbreviations may contain a mix of capital and lowercase letters. Prepositions like of, for example, may be represented by a lowercase letter in an acronym that is otherwise capitalized.


1 Answers

It should be SSLXMLRPCServer, to match the standard library classes like SimpleXMLRPCServer, CGIXMLRPCRequestHandler, etc.

Adopting a naming convention that differs from equivalents in the standard library is only going to confuse people.

like image 121
Porculus Avatar answered Oct 06 '22 00:10

Porculus