[Python-Dev] PEP 7 clarification request: braces (original) (raw)
Tim Delaney timothy.c.delaney at gmail.com
Mon Jan 2 23:09:49 CET 2012
- Previous message: [Python-Dev] PEP 7 clarification request: braces
- Next message: [Python-Dev] PEP 7 clarification request: braces
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 3 January 2012 08:50, Larry Hastings <larry at hastings.org> wrote:
On 01/02/2012 12:47 AM, Raymond Hettinger wrote:
Really? Do we need to have a brace war? People have different preferences. The standard library includes some of both styles depending on what the maintainer thought was cleanest to their eyes in a given context.
I'm with Raymond. Code should be readable, and code reviews are the best way to achieve that--not endlessly specific formatting rules. Have there been bugs in CPython that the proposed new PEP 7 rule would have prevented?
I've found that until someone has experienced multiple nasty bugs caused by not always using braces, it's nearly impossible to convince them of why you should. Afterwards it'simpossible to convince them (me) that you shouldn't always use braces.
I'd also point out that if you're expecting braces, not having them can make the code less readable. A consistent format tends to make for more readable code.
Cheers,
Tim Delaney -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20120103/2e9ac599/attachment-0001.html>
- Previous message: [Python-Dev] PEP 7 clarification request: braces
- Next message: [Python-Dev] PEP 7 clarification request: braces
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]