Functools backport