Re: [Python-Dev] [Python-checkins] peps: Add rules for indenting continuation lines.

2011-06-03 Thread Lennart Regebro
On Fri, Jun 3, 2011 at 00:15, Barry Warsaw wrote: > On Jun 02, 2011, at 12:57 PM, Glenn Linderman wrote: > >>On 6/2/2011 12:01 PM, Guido van Rossum wrote: >>> Bingo. That's why. (Though you are missing some colons in your examples.:-) >>> >>> --Guido >> >>You operate as a good Python compiler :) >

Re: [Python-Dev] [Python-checkins] peps: Add rules for indenting continuation lines.

2011-06-02 Thread Ben Finney
Greg Ewing writes: > Another way to approach that is > > if some_function( > Some, > Parameters, > To, > Pass, > ): > If_True_Operations() > > i.e. indent the *body* one more place. This avoids the jarriness of > seeing an outdent that doesn't correspond to the closing

Re: [Python-Dev] [Python-checkins] peps: Add rules for indenting continuation lines.

2011-06-02 Thread Glenn Linderman
On 6/2/2011 3:18 PM, Greg Ewing wrote: i.e. indent the *body* one more place. This avoids the jarriness of seeing an outdent that doesn't correspond to the closing of a suite. -1. There are likely many more lines in the suite than in the conditional, that, by being double indented, would now

Re: [Python-Dev] [Python-checkins] peps: Add rules for indenting continuation lines.

2011-06-02 Thread Greg Ewing
Guido van Rossum wrote: Bingo. That's why. (Though you are missing some colons in your examples. :-) --Guido On Thu, Jun 2, 2011 at 11:50 AM, Glenn Linderman wrote: One place a double indent is extremely nice is for lines that initiate a new indentation, but are themselves continued: if som

Re: [Python-Dev] [Python-checkins] peps: Add rules for indenting continuation lines.

2011-06-02 Thread Glenn Linderman
On 6/2/2011 3:49 PM, Guido van Rossum wrote: Except that the rule gets more complicated. I don't think that always using the double indent is going to mean a lot more line breaks, so I don't think there's much benefit to the added complication. Further, tools like python-mode would have to go b

Re: [Python-Dev] [Python-checkins] peps: Add rules for indenting continuation lines.

2011-06-02 Thread Guido van Rossum
On Thu, Jun 2, 2011 at 3:15 PM, Barry Warsaw wrote: > On Jun 02, 2011, at 12:57 PM, Glenn Linderman wrote: > >>On 6/2/2011 12:01 PM, Guido van Rossum wrote: >>> Bingo. That's why. (Though you are missing some colons in your examples.:-) >>> >>> --Guido >> >>You operate as a good Python compiler :)

Re: [Python-Dev] [Python-checkins] peps: Add rules for indenting continuation lines.

2011-06-02 Thread Barry Warsaw
On Jun 02, 2011, at 12:57 PM, Glenn Linderman wrote: >On 6/2/2011 12:01 PM, Guido van Rossum wrote: >> Bingo. That's why. (Though you are missing some colons in your examples.:-) >> >> --Guido > >You operate as a good Python compiler :) Actually, this is a key insight, which I just mentioned in a

Re: [Python-Dev] [Python-checkins] peps: Add rules for indenting continuation lines.

2011-06-02 Thread Glenn Linderman
On 6/2/2011 12:01 PM, Guido van Rossum wrote: Bingo. That's why. (Though you are missing some colons in your examples.:-) --Guido You operate as a good Python compiler :) ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailma

Re: [Python-Dev] [Python-checkins] peps: Add rules for indenting continuation lines.

2011-06-02 Thread Barry Warsaw
On Jun 02, 2011, at 03:07 PM, R. David Murray wrote: >Personally, I use "enough" indentation. Sometimes that is a single >indentation level, but sometimes it is more. Two spaces is definitely >right out, though :) > >The place where a single indentation level is *not* enough is when the >line be

Re: [Python-Dev] [Python-checkins] peps: Add rules for indenting continuation lines.

2011-06-02 Thread R. David Murray
On Thu, 02 Jun 2011 14:19:00 -0400, Barry Warsaw wrote: > On Jun 02, 2011, at 08:09 PM, guido.van.rossum wrote: > >+Yes: # Aligned with opening delimiter > >+ foo = long_function_name(var_one, var_two, > >+ var_three, var_four) > >+ > >+ # D

Re: [Python-Dev] [Python-checkins] peps: Add rules for indenting continuation lines.

2011-06-02 Thread Guido van Rossum
Bingo. That's why. (Though you are missing some colons in your examples. :-) --Guido On Thu, Jun 2, 2011 at 11:50 AM, Glenn Linderman wrote: > On 6/2/2011 11:19 AM, Barry Warsaw wrote: > > On Jun 02, 2011, at 08:09 PM, guido.van.rossum wrote: > > +Continuation lines should align wrapped elem

Re: [Python-Dev] [Python-checkins] peps: Add rules for indenting continuation lines.

2011-06-02 Thread Glenn Linderman
On 6/2/2011 11:19 AM, Barry Warsaw wrote: On Jun 02, 2011, at 08:09 PM, guido.van.rossum wrote: +Continuation lines should align wrapped elements either vertically using +Python's implicit line joining inside parentheses, brackets and braces, +or using a hanging indent of double you

Re: [Python-Dev] [Python-checkins] peps: Add rules for indenting continuation lines.

2011-06-02 Thread Barry Warsaw
On Jun 02, 2011, at 08:09 PM, guido.van.rossum wrote: >+Continuation lines should align wrapped elements either vertically using >+Python's implicit line joining inside parentheses, brackets and braces, >+or using a hanging indent of double your code indention, in which case >+th