Linebreaks and Indention

Martin Schulze joey at infodrom.org
Wed Mar 24 20:22:50 CET 2004


Daniel Calvelo Aros wrote:
> In almost all cases, I try to indent by four spaces. 

I used this as default for indention as well.

> Only exceptions are complicated expressions involving nested function calls,
> where I try to indent each functions arguments according to the expression
> structure, like:
> 
> outer_call(
>             tricky_function(
>                              arg_foo,
>                              arg_baz = bar,
>                              arg_bar
>                             ),
>             further_function(
>                              with,
>                              its,
>                              own = args
>                              )
>             )
> 
> But that could as well be
> 
> outer_call(
>     tricky_function(
>         arg_foo,
>         arg_baz = bar,
>         arg_bar
>     ),
>     further_function(
>         with,
>         its,
>         own = args
>     )
> )

Interesting idea.

> BTW, opening brackets always at the end of the line. Old habit from the days
> where python wouldn't accept multi-line expressions sans backslash except with
> an unclosed bracket.

Ah, I see.  I'm new to Python.  Hit one Perl-trap already the other day...

> Just my taste of it. Are you trying to build consensus? Stuff like this should
> be in the guidelines.

I didn't discover it there.  Consensus, well, not really.  I'd like to
know how the main developer, i.e. Bernhard, would like things to look
like, especially when I'm unsure how to indent it properly.

Regards,

	Joey

-- 
Still can't talk about what I can't talk about.  Sorry.  -- Bruce Schneier




More information about the Thuban-devel mailing list

This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)