[python] More py3k fixes.