On Sun, Apr 27, 2014 at 1:40 PM, Barry Warsaw <ba...@python.org> wrote:

> On Apr 27, 2014, at 12:34 PM, Chris Barker wrote:
> >foo = long_function_name(var_one,
> >                                          var_two,
> >                                          var_three,
> >                                          var_four)
>
> Wow, do you really indent those 42 columns?
>

No -- stupid variable-width font!

I don't think anyone should write code with variable width fonts, and I'd
rather not do email that way either, but gmail is making it tough these
days..

Sorry for the added confusion.

This actually is forbidden because you're not using "vertical alignment"
> when
> there is an argument on the first line.  You would have to line up
> `var_two`
> right under `var_one` to be compliant.


yeah -- that was the intent....

oh well.

>That is, I find that if the argument list is too long for one line, then
> >splitting it out to only one argument per line is much more readable to
> me.
>
> Sure.  The PEP outlines ways to do that.


not really -- it allows it:

# Aligned with opening delimiter.
foo = long_function_name(var_one, var_two,
                         var_three, var_four)

but all the examples have more than one variable per line...my point is
that I think that should be discouraged.

i.e. I think the above should be:

# Aligned with opening delimiter.
foo = long_function_name(var_one,
                         var_two,
                         var_three,
                         var_four)

(done with fixed-width font this time -- but it may not look right in your
mail reader..)

though I doubt there would consensus on requiring that -- but many of us
learn more from examples than the specification, so maybe I'll submit a
patch with an example like that.

-Chris

-- 

Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

chris.bar...@noaa.gov
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to