How do i name things in python?
-
- Names must start with a letter or underscore.
- Classes generally use CamelCase and variables all lowercase snake_case.
A-Z, a-z, _
- Can include any number of letters, underscores and digits
A-Z, a-z, 0-9, _
Python3 is based on Unicode, a universal coded character set.
Unicode
Where are names used in python, Object names, Classes, scripts and module files.
Classes (summerise objects) are usually written in
CamelCase
Objects includes variable, modules, packages, and functions are usually written in
snake_case
scripts and module names, used by python from an OS perspective, usually contain letters, underscores, end in the
.py
extension
© Lightnetics 2024