Refactor: Java style to Python style (I)