[Python-Dev] fixing sum's performance bug