Add changes suggested by python-modernize