Search code examples
pythoncoding-stylenaming-conventionscamelcasing

How do I combine lowerCamelCase with all-caps abbreviations? (with style)


Let's assume OSCClient is a class and I want instances of a class to begin with a lower case letter:

oSCClient = OSCClient() # ew!

edit: I asked this question because of pep 8 which says: "When using abbreviations in CapWords, capitalize all the letters of the abbreviation. Thus HTTPServerError is better than HttpServerError."


Solution

  • I'd use

    oscClient = OSCClient() # yey