BadPython.com

Suggestion for "Default argument"

checks kwarg for none instead
            
def my_function(keyword_arg=None):
    """appends or starts a new list"""
    if keyword_arg:
        keyword_arg.append(1)
    else:
        keyword_arg = [1]
    return keyword_arg