python: small changes