Consider replacing ´cookies=[]´ with ´cookies=()´ or ´cookies=None' and handle necessary casting later in line 152. [] is mutable whereas () is not, meaning the default value of the cookies keyword argument persists between/across uses.
def __init__(self, size=(1280, 768), ctx=None, cookies=[]):
Context: Line 139 in phantompy / phantompy / page.py on branch master, as of 444219e
Consider replacing ´cookies=[]´ with ´cookies=()´ or ´cookies=None' and handle necessary casting later in line 152. [] is mutable whereas () is not, meaning the default value of the cookies keyword argument persists between/across uses.
For further rational, see: http://stackoverflow.com/questions/366422/what-is-the-pythonic-way-to-avoid-default-parameters-that-are-empty-lists and http://effbot.org/zone/default-values.htm