char** to {'':('',)}
Ignacio Vazquez-Abrams
ignacio at openservices.net
Fri Aug 31 13:59:03 EDT 2001
On Fri, 31 Aug 2001, Tim Peters wrote:
> [Ignacio Vazquez-Abrams]
> > Well, I've released this needlessly brittle code, so now you can
> > critique it in it's entirety:
>
> Nope. I was never criticizing your code, I was ridiculing your fear of
> gotos for your own good <wink>.
No, no. I didn't mean criticize, I meant critique. Also if you could take a
quick look over it that would be MUCH appreciated.
> > ...
> > Ugh. Returning from within the do as soon as the error occurs
> > would probably be better anyways.
>
> In which case the code becomes brittle, because you have to remember to
> decref the partial result (if any), and every temp, before returning. It's
> not especially hard to get that right when you first write the code, but
> under modification the number of error returns increases, and the set of
> temps changes, and exactly when each temp first becomes non-NULL shifts, and
> then you've got an ever-growing number of code regions that need to be
> patched by hand. The goto version remains dead simple.
>
> come-back-after-you've-maintained-extensions-for-years<wink>-ly y'rs - tim
Fair enough. I've only been writing C extensions for a couple of weeks so I
have no PoR, but I'll believe you on that one.
--
Ignacio Vazquez-Abrams <ignacio at openservices.net>
More information about the Python-list
mailing list