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/134393.html below:

[Python-Dev] pep8 reasoning

[Python-Dev] pep8 reasoningStephen J. Turnbull stephen at xemacs.org
Tue Apr 29 03:30:36 CEST 2014
 > On Mon, Apr 28, 2014 at 11:12 AM, Chris Barker wrote:

 > 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)

I don't have a problem with discouraging it, but it should not be
flagged in pep8 (OK in pep8 --wink-wink-nudge-nudge-say-no-more-eh,
though!)

I usually do use the style you prefer, especially when the arguments
want to be commented, but in many cases the arguments are semantically
tuples.  Eg,

    rect1 = paint_rectangle(point[1], point[0],        # top, left
                            textheight + 2 * padding, textwidth + 2 * padding,
                            chartreuse)

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