Update older Python code to newer supported style
3 files changed