1#module names should be all lowercase
2import mymodule
3#normal variables are lowercase_with_underscores
4my_variable = 'value'
5#constants are UPPERCASE
6CONSTANT = 'never changes'
7#classes are UpperCaseCamelCase
8class MyClass(self):
9 pass
1# pep8 Style Guide for Lists
2my_list = [
3 1, 2, 3,
4 4, 5, 6,
5 ]
6result = some_function_that_takes_arguments(
7 'a', 'b', 'c',
8 'd', 'e', 'f',
9 )
10
1# PEP 8 Class names
2# Class names should normally use the CapWords convention.
3
4class MyClass:
5 def __init__(self):
6 # Variable and method names are snake_case
7 self.load_time = 25
8 def print_value(self, value):
9 print(value)