Assignment Versus Equality

Chris Angelico rosuav at gmail.com
Tue Jun 28 03:26:08 EDT 2016


On Tue, Jun 28, 2016 at 5:12 PM, Lawrence D’Oliveiro
<lawrencedo99 at gmail.com> wrote:
> <https://github.com/ldo/dvd_menu_animator/blob/master/spuhelper.c>.

do { /* once */
   if (error) break;
   ...
} while (false);
do_cleanup;

Why not:

if (error) goto cleanup;
...
cleanup:
do_cleanup;

Oh, right. XKCD 292. I still think it's better to use the goto, though
- you just need velociraptor repellent.

ChrisA


More information about the Python-list mailing list