Python Style Guide

January 23, 2018
  

Base style guide python.

  • Function invocation.
      # Aligned with opening delimiter.
      foo = long_function_name(var_one, var_two,
                               var_three, var_four)
    
      # More indentation included to distinguish this from the rest.
      def long_function_name(
              var_one, var_two, var_three,
              var_four):
          print(var_one)
    
      # Hanging indents should add a level.
      foo = long_function_name(
          var_one, var_two,
          var_three, var_four)
    

Note: I’ll be keep on updating it.

Reference:


Please give feedback at email@murarisumit.in