Naming Conventions - II

Exception Names:

Because exceptions should be classes, the class naming convention applies here. However, you should use the suffix "Error" on your exception names (if the exception actually is an error).

For example: Sunita, add this. Add examples for the rest

Function Names:

Function names should be lowercase, with words separated by underscores as necessary to improve readability.

Global Variable Names:

Global Variable Name follows same as functions. It should be lowercase and can be use underscores as necessary.

Functions and Method arguments:

Always use self for the first argument to instance methods.

Always use cls for the first argument to class methods.

If a function argument’s name clashes with a reserved keyword, it is generally better to append a single trailing underscore rather than use spelling corruption. i.e. class_ is better than clss.

Names to Avoid:

Never use the characters 'l' (lowercase letter el), 'O' (uppercase letter oh), or 'I' (uppercase letter eye) as single character variable names. In some fonts, these characters are indistinguishable from the numerals one and zero. When tempted to use 'l', use 'L' instead.

Complete and Continue