def switch(self): space = self.space try: Coroutine.switch(self) except CoroutineExit: raise OperationError(self.costate.w_CoroutineExit, space.w_None)