@TRRaveendra
Python Naming Conventions
@TRRaveendra
Python naming conventions can be managed in four ways.
1.Camel Case
2.Snake Case
3.Pascal Case
4.Kebab Case
Camel CASE @TRRaveendra
1.In camel case, you start a name with a small letter.
2.If the name has multiple words, the later words will start with a capital letter.
3.In the 1970s and 1980s, medial capitals were adopted as a standard or alternative naming convention for
fi
multi-word identi ers in several programming languages.
Snake CASE @TRRaveendra
1. Names should be small letters in snake case.
2. If the name has multiple words, And All the words should be small letters and you use a
underscore (_) to separate the words.
3. For example, a variable named first_name would be written in snake case. This is also
sometimes referred to as lower snake case.
Pascal CASE @TRRaveendra
CamelCase with the rst letter capitalized is Pascal CASE
fi
Kebab CASE @TRRaveendra
1.Kebab case is similar to snake case.
2.You use a hyphen (-) instead of an underscore (_) to separate the words.
Python Object Naming Conventions @TRRaveendra
Package and Module Names
Modules should have short, all-lowercase names. Underscores can be used
in the module name if it improves readability. Python packages should
also have short, all-lowercase names, although the use of underscores is
discouraged.
Class Names
Almost without exception, class names use the CapWords convention.
Classes for internal use have a leading underscore in addition.
Exception Names
Because exceptions should be classes, the class naming convention
applies here. However, you should use the suf x "Error" on your
exception names (if the exception actually is an error).
Function Names
Function names should be mixedCase.
Method Names and Instance Variables
Use the function naming rules.
Use one leading underscore only for non-public methods and instance
variables.
Constants
Constants are usually de ned on a module level and written in all
capital letters with underscores separating words. Examples include
MAX_OVERFLOW and TOTAL.
fi
fi
A Short List of Libraries Used in Data Engineering @TRRaveendra
@TRRaveendra
Learn
&
Lead
Like Celebrate Support Funny Love Insightful Curious