python: cosmetic fixes