def unindent_string(docstring):
 lines = docstring.expandtabs().splitlines()
 icount = indentcount_lines(lines)
 if (icount == 0):
  return docstring
 return '\n'.join([line[icount:] for line in lines])

def unindent_string ( docstring ) : lines = docstring . expandtabs ( ) . splitlines ( ) icount = indentcount_lines ( lines ) if ( icount == 0 ) : return docstring return '\n' . join ( [ line [ icount : ] for line in lines ] )
set docstring to minimum indent for all lines .