Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Python naming conventions

Packages: short, all-lowercase names. Preferably no underscores.=>utilities

Modules: short, all-lowercase names. Can have underscores.	=> db_utils

Classes: CapWords (upper camel case) convention 			=> BankAccount

Functions: lowercase, words separated by underscores  		=> open_account
(snake_case)

Variables: lowercase, words separated by underscores 		=> account_id
(snake_case)

Constants: all-uppercase, words separated by underscores	=> MIN_APR
 
PREVIOUS NEXT
Tagged: #Python #naming #conventions
ADD COMMENT
Topic
Name
7+7 =