[Numpy-discussion] isnan and co: cleaning up

David Cournapeau david@ar.media.kyoto-u.ac...
Sat Sep 6 03:40:33 CDT 2008


Charles R Harris wrote:
>
>
> This one <http://en.wikipedia.org/wiki/Indent_style#K.26R_style>
>
> int main(int argc, char *argv[])
>
> {
>     ...
>     while (x == y) {
>         something();
>
>         somethingelse();
>         if (some_error)
>             do_correct();
>
>         else
>             continue_as_usual();
>     }
>     finalthing();
>
>     ...
> }
>
> I'm a bit of a heretic myself, I always use braces in if statements, even for one liners. 

me too ( I believe it avoids mistakes when the one statement becomes 2 
- although recent gcc may have a warning for that).

I think I will use the same technique as R to detect those functions
(because it may be a macro or a function; C99 says function, but old
platform and the MS one do not have macro).

cheers,

David


More information about the Numpy-discussion mailing list