A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2014-April/134336.html below:

[Python-Dev] pep8 reasoning

[Python-Dev] pep8 reasoningTerry Reedy tjreedy at udel.edu
Sun Apr 27 22:28:20 CEST 2014
On 4/27/2014 3:34 PM, Chris Barker wrote:
> On Sun, Apr 27, 2014 at 9:40 AM, Barry Warsaw <barry at python.org
> <mailto:barry at python.org>> wrote:
>
>     On Apr 26, 2014, at 12:33 AM, Janzert wrote:
>
>      >So the one example under discussion is:
>      >foo = long_function_name(
>      >   var_one, var_two,
>      >   var_three, var_four)
>      >
>      >and comes from http://legacy.python.org/dev/peps/pep-0008/#indentation
>
>
> wow! just looked at that part of the PEP again, and that is a LOT of
> options. Is it impossible to come to any consensus on this? And as it
> happens, my favorite is not in there, though as far as I can tell not
> forbidden:

One arg per line is definitely permitted either when lining up with the 
first arg on the first line or with hanging indents.

> foo = long_function_name(var_one,
>                                            var_two,
>                                            var_three,
>                                            var_four)

In a fixed-pitch font, you have too many spaces for lines after the 
first. One advantage of hanging indent is that all arg lines have the 
same indent and thus the args line up regardless of the font. Hanging 
indents also give more space for default or named args and comments.

I would agree with having at least one example done with one arg per line.

-- 
Terry Jan Reedy

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4