[Python-Dev] cpython (3.2): adjust braces a bit (original) (raw)
anatoly techtonik techtonik at gmail.com
Tue Nov 1 08:40:15 CET 2011
- Previous message: [Python-Dev] draft PEP: virtual environments
- Next message: [Python-Dev] draft PEP: virtual environments
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Fri, Oct 21, 2011 at 8:17 PM, Benjamin Peterson <benjamin at python.org> wrote:
2011/10/21 Tres Seaver <tseaver at palladion.com>:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 10/21/2011 12:31 PM, Benjamin Peterson wrote: 2011/10/21 Eric V. Smith <eric at trueblade.com>: What's the logic for adding some braces, but removing others?
No braces if everything is a one-liner, otherwise braces everywhere. Hmm, PEP 7 doesn't show any example of the one-liner exception. Given that it tends to promote errors, particularly among indentation-conditioned Python programmers (adding another statement at the same indentation level), why not just have braces everywhere? Because we're not writing Python?
Right. Only CPython here. Where can I find The True Python? =)
BTW, some of this stuff may find its way into PEP-7 http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml?showone=Conditionals#Conditionals
anatoly t.
- Previous message: [Python-Dev] draft PEP: virtual environments
- Next message: [Python-Dev] draft PEP: virtual environments
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]