Refined to a more traditional Python style