Interesting trick! The PEP 341 patch is now using Marek's 'do ... while' resource cleanup trick instead of the nasty goto voodoo.
I've also fixed the last remaining bug that Neal pointed out. I'm running the unit tests right now, shall have the updated (and hopefully final) PEP 341 patch up on sourceforge within the next 15 minutes. If anybody has feedback/suggestions for the patch, please let me know. I'm new to this stuff, so I'm still finding my way around :) Cheers, Tom Nick Coghlan wrote: >Marek Baczek BaczyĆski wrote: > > >>2005/11/15, Nick Coghlan <[EMAIL PROTECTED]>: >> >> >>>It avoids the potential for labelling problems that arises when goto's are >>>used for resource cleanup. It's a far cry from real exception handling, but >>>it's the best solution I've seen within the limits of C. >>> >>> >><delurk> >>do { >> .... >> .... >>} while (0); >> >> >>Same benefit and saves some typing :) >> >> > >Heh. Good point. I spend so much time working with a certain language I tend >to forget do/while loops exist ;) > >Cheers, >Nick. > > > _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com