On Mon, 18 Jan 2016 at 00:59 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.
>

I'm going to assume you mean it is clearer without them, else I don't hear
an argument against beyond "I don't wanna".

For me, I don't see how::

  int x = do_something();
  if (x != 10)
    return NULL;
  do_some_more();

is any clearer or more readable than::

  int x = do_something();
  if (x != 10) {
    return NULL;
  }
  do_some_more();



> 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 personally have come close to screwing up like this, but I caught it
before I put up a patch.

I honestly also prefer the consistency of just always using braces rather
than the sometimes rule we have. It isn't like C is a pretty, safe language
to begin with, so I would rather be consistent and avoid potential errors.
_______________________________________________
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

Reply via email to