[master] use del [:] to clear lists; clear() isn't available for older python.