functools.partial used in mutation closures