Programming advanced techniques: naming convention and camelCase

Last updated on:9 days ago

There are four main types of coding customs to name something in your programs: Hungarian notation, camel case, Pascal case and underscore case. I would like to use the camel case to write my code.

What is the camel case?

Camel case (sometimes stylized as camelCase or CamelCase, also known as camel caps or more formally as medial capitals) is the practice of writing phrases without spaces or punctuation, indicating the separation of words with a single capitalized letter, and the first word starting with either case. Common examples include “iPhone” and “eBay”.

My rules

Constant: CAMELCASE

Variable :CamelCase

Class: CamelCaselastcase

Function: camelCase

Function file: camelCase

Data file: camel_case (.xlsx, .jpg)

Folder: camelcase

Reference

[1] Camel case

[2] How to Write Beautiful Python Code With PEP 8


本博客所有文章除特别声明外,均采用 CC BY-SA 4.0 协议 ,转载请注明出处!