Re: [Python-Dev] Update PEP 7 to require curly braces in C

2016-01-17 Thread Georg Brandl
On 01/17/2016 11:19 PM, Brett Cannon wrote: > > > On Sun, 17 Jan 2016, 13:59 Ethan Furman > wrote: > > On 01/17/2016 11:10 AM, Brett Cannon wrote: > > > https://www.imperialviolet.org/2014/02/22/applebug.html. Skipping the > > curly braces is purely an ae

Re: [Python-Dev] Update PEP 7 to require curly braces in C

2016-01-17 Thread Victor Stinner
I like if without braces when the body is only one line, especially when there is no else block. Victor Le dimanche 17 janvier 2016, Brett Cannon a écrit : > While doing a review of http://bugs.python.org/review/26129/ I asked to > have curly braces put around all `if` statement bodies. Serhiy

Re: [Python-Dev] Update PEP 7 to require curly braces in C

2016-01-17 Thread Guido van Rossum
I'm +0. The editor I use is too smart to let me make this mistake, but I don't object to recommending it. As usual, though, let's not start mindless reformatting of existing code. -- --Guido van Rossum (python.org/~guido) ___ Python-Dev mailing list Pyt

Re: [Python-Dev] Update PEP 7 to require curly braces in C

2016-01-17 Thread Robert Collins
+1 from me on requiring them. On 18 January 2016 at 11:19, Brett Cannon wrote: > > > On Sun, 17 Jan 2016, 13:59 Ethan Furman wrote: >> >> On 01/17/2016 11:10 AM, Brett Cannon wrote: >> >> > https://www.imperialviolet.org/2014/02/22/applebug.html. Skipping the >> > curly braces is purely an aesth

Re: [Python-Dev] Update PEP 7 to require curly braces in C

2016-01-17 Thread Brett Cannon
On Sun, 17 Jan 2016, 13:59 Ethan Furman wrote: > On 01/17/2016 11:10 AM, Brett Cannon wrote: > > > https://www.imperialviolet.org/2014/02/22/applebug.html. Skipping the > > curly braces is purely an aesthetic thing while leaving them out can > > lead to actual bugs. > > Not sure what that sentenc

Re: [Python-Dev] Update PEP 7 to require curly braces in C

2016-01-17 Thread Ethan Furman
On 01/17/2016 11:10 AM, Brett Cannon wrote: https://www.imperialviolet.org/2014/02/22/applebug.html. Skipping the curly braces is purely an aesthetic thing while leaving them out can lead to actual bugs. Not sure what that sentence actually says, but +1 on making them mandatory. -- ~Ethan~ __

[Python-Dev] Update PEP 7 to require curly braces in C

2016-01-17 Thread Brett Cannon
While doing a review of http://bugs.python.org/review/26129/ I asked to have curly braces put around all `if` statement bodies. Serhiy pointed out that PEP 7 says curly braces are optional: https://www.python.org/dev/peps/pep-0007/#id5. I would like to change that. My argument is to require them t