[py3k] reduce() is moved to functools in python3