allowing braces around suites

Ben Last ben at
Sat Aug 28 22:05:40 CEST 2004

> From Roel Schroeven
> > Paul McGuire illustrated the corresponding problem in C:
> >     db->update_name(person);
> >
> >     if (is_student(person))
> >         log("update student %s", person->name);
> >         db->update_courses(person);
> >     db->commit();
> Sorry, I meant "C or C++, even with consistent use of braces", implying
> that using braces IMO in general doesn't help spotting this kind of bugs.

On the other hand, *compulsory* use of them, and eliminating the "special
case" of one-line blocks, might.  It's that special case that bites here,
braces or no braces.

Not that I'm in favour of the braces idea - I think it's redundant in the
extreme, and misses the point of Python big time. :)


More information about the Python-list mailing list