(self, typ, val=None, tb=None)
Raise an exception in the generator.
        Return next yielded value or raise StopIteration.
Raise an exception in the generator.
        Return next yielded value or raise StopIteration.
Raise an exception in the generator . Return next yielded value or raise StopIteration .
def throw(self, typ, val=None, tb=None):
        """Raise an exception in the generator.
        Return next yielded value or raise StopIteration.
        """
        if val is None:
            if tb is None:
                raise typ
            val = typ()
        if tb is not None:
            val = val.with_traceback(tb)
        raise val
def throw ( self , typ , val = None , tb = None ) : if val is None : if tb is None : raise typ val = typ ( ) if tb is not None : val = val . with_traceback ( tb ) raise val