allow line break at operators
Seebs
usenet-nospam at seebs.net
Fri Aug 12 14:37:41 EDT 2011
On 2011-08-12, Chris Rebert <clp2 at rebertia.com> wrote:
> One argument I've heard from braces fans is that sometimes they want
> their own structure, which does not match the actual block structure.
EWW!
> 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).
That's horrid.
FWIW, the C idiom is:
{
FILE *f = ...
...
fclose(f);
}
It isn't used all that widely, but it is a lot less horrible than
random indenting would be.
-s
--
Copyright 2011, all wrongs reversed. Peter Seebach / usenet-nospam at seebs.net
http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures
http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!
I am not speaking for my employer, although they do rent some of my opinions.
More information about the Python-list
mailing list