allow line break at operators

Chris Rebert clp2 at rebertia.com
Fri Aug 12 13:03:04 EDT 2011


On Fri, Aug 12, 2011 at 3:39 AM, Ben Finney <ben+python at benfinney.id.au> wrote:
> Seebs <usenet-nospam at seebs.net> writes:
>
>> Question for y'all:
>>
>> Has anyone here ever ACTUALLY encountered a case where braces -- not
>> indentation -- did not match intent in a C-like language?  I'm talking
>> only about cases where braces are *actually present*.
>
> What a strange limitation. Why are you not comparing apples with apples?
>
> The correct comparison would be “getting the braces to match the
> intended structure” compared with “getting the indentation to match the
> intended structure”.

One argument I've heard from braces fans is that sometimes they want
their own structure, which does not match the actual block structure.
Example:

FILE* f = fopen(...);
    // do stuff with f
    // at this indent level
fclose(f);
// back to normal

But really this is just working around other limitations in the
language (i.e. lack of a with-statement equivalent).

Cheers,
Chris
--
http://rebertia.com



More information about the Python-list mailing list