[Python-Dev] Update PEP 7 to require curly braces in C
Victor Stinner
victor.stinner at gmail.com
Mon Jan 18 02:00:19 EST 2016
More information about the Python-Dev mailing list
Mon Jan 18 02:00:19 EST 2016
- Previous message (by thread): [Python-Dev] Update PEP 7 to require curly braces in C
- Next message (by thread): [Python-Dev] Update PEP 7 to require curly braces in C
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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 <brett at python.org> 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 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 to prevent bugs like the one Apple made > with OpenSSL about two years ago: > 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. > > Anyone object if I update PEP 7 to remove the optionality of curly braces > in PEP 7? > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20160118/9de2e8c6/attachment.html>
- Previous message (by thread): [Python-Dev] Update PEP 7 to require curly braces in C
- Next message (by thread): [Python-Dev] Update PEP 7 to require curly braces in C
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-Dev mailing list