[Numpy-discussion] isnan and co: cleaning up

Charles R Harris charlesr.harris@gmail....
Fri Sep 5 22:43:30 CDT 2008


On Fri, Sep 5, 2008 at 9:15 PM, David Cournapeau <cournape@gmail.com> wrote:

> On Sat, Sep 6, 2008 at 8:38 AM, Charles R Harris
> <charlesr.harris@gmail.com> wrote:
> >
> > +1, but (putting on pedant hat) I think the functions should be formatted
> in
> > the way revealed to us by K&R.
>
> By K&R, you mean the K&R style, right , not the K&R function
> declaration style ? :)
>

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. It's just a bit easier on my eyes.

Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20080905/868e5335/attachment.html 


More information about the Numpy-discussion mailing list