This section shouldn't act as a replacement for the style rules listed above in PEP-8, however it shows a number of common cases where care should be taken.
def myfunction(arga, argb=None):
""" Function documentation. """ # Always use triple double-quotes for docstrings
data = { # If a dictionary doesn't fit on one line, split like this
"first": 1, # space after : but not before
"second": 2, # Comma on the last item of a dictionary or list
} # Align with the beginning of the variable name
astr = "Some data" # Always use double quotes for strings
bstr = 'He said "quote with care"' # ... unless you need to include them in a string
arga += 1
if arga > 1:
print("Big argument") # Python3-style print functions
def anotherfunction(): # 2 newlines between functions in a module
myfunction(1, argb=4) # Space after ,; no spaces around =
Hi. This is a Test.