Answers for "pep8"

2

camelcase naming convention python

# CamelCase is the way you are meant to name classes:
class ExampleClass(self):
  pass
# Start each word with a capital
# Don't seperate words with underscores
Posted by: Guest on November-27-2020
4

pep 8 function

# Pep 8 Style Guide for function definition. Function names are snake case
def function_name():
Posted by: Guest on November-21-2020
1

python code style

This python pep sums it up: https://www.python.org/dev/peps/pep-0008/
Posted by: Guest on August-20-2020
2

pep8

# pep8 Style Guide for Lists
my_list = [
    1, 2, 3,
    4, 5, 6,
    ]
result = some_function_that_takes_arguments(
    'a', 'b', 'c',
    'd', 'e', 'f',
    )
Posted by: Guest on October-18-2020
0

pep8

# pep8 Style Guide for Lists (easier to see indentation imo)
my_list = [
    1, 2, 3,
    4, 5, 6,
]
result = some_function_that_takes_arguments(
    'a', 'b', 'c',
    'd', 'e', 'f',
)
Posted by: Guest on December-08-2020

Python Answers by Framework

Browse Popular Code Answers by Language