On Mon, Jan 18, 2016 at 10:42 PM, Maciej Szulik <solt...@gmail.com> wrote: > On Mon, Jan 18, 2016 at 9:59 AM, Larry Hastings <la...@hastings.org> wrote: >> >> >> >> On 01/17/2016 11:10 AM, Brett Cannon wrote: >> >> Anyone object if I update PEP 7 to remove the optionality of curly braces >> in PEP 7? >> >> >> I'm -1. I don't like being forced to add the curly braces when the code >> is perfectly clear without them. If this was a frequent problem then I'd >> put up with it, but I can't recall ever making this particular mistake >> myself or seeing it in CPython source. It seems to me like a fix for a >> problem we don't have. >> > > I'm +1. We don't have that problem yet and the idea Brett brought up is for > future changes that will happen. > We'll be soon moving to github, which should simplify the process of > submitting PRs from other developers > interested in making our beautiful language even more awesome. I'm quite > positive that with current review > process that kind of bug should not happen, but you never know. Having this > as a requirement is rather to > minimize the risk of potentially having such bugs. I've switched to this > style myself good couple years ago > and I find it very readable atm.
Rather than forcing people to use braces, wouldn't it be easier to just add a linter to the toolchain that will detect those kinds of problems and reject the commit? Which might be as simple as telling a compiler to treat this warning as an error, and then always use that compiler at some point before committing. (I don't know how many compilers can check this.) I'm -1 on forcing people to use a particular style when a script could do the same job more reliably. ChrisA _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com