Re: [Python-Dev] Problems with GeneratorExit deriving from Exception

2007-12-02 Thread Chad Austin
Hi Antoine, Antoine Pitrou wrote: > Hi, > > (I was asked to forward this from the bug tracker) > >> We have also run into problems where a task tries to "return" (yield >> Return()) >> from within a try: except Exception: block. Since returning from a >> coroutine is >> roughly equivalent to

Re: [Python-Dev] Problems with GeneratorExit deriving from Exception

2007-12-01 Thread Chad Austin
Guido van Rossum wrote: > On Dec 1, 2007 2:38 PM, Chad Austin <[EMAIL PROTECTED]> wrote: >> This problem could be solved in several ways: >> >> 1) Make GeneratorExit derive from BaseException, just like SystemExit. > > Well argued. I suggest to go for option (1

[Python-Dev] Problems with GeneratorExit deriving from Exception

2007-12-01 Thread Chad Austin
Hello Python-Dev, Here at IMVU, we love Python 2.5's generators-as-coroutines. That feature has let us succinctly express algorithms that intermix asynchronous network requests and UI operations without writing complicated state machines, and, perhaps most importantly, get high-quality unit tests