Example #1
0
    def __init__(self, space):
        BaseCoState.__init__(self)
        self.w_tempval = space.w_None
        self.space = space

        # XXX Workaround: for now we need to instantiate these classes
        # explicitly for translation to work
        W_CoroutineExit(space)
        W_TaskletExit(space)

        # Exporting new exception to space
        self.w_CoroutineExit = space.gettypefor(W_CoroutineExit)
        space.setitem(
                      space.exceptions_module.w_dict,
                      space.new_interned_str('CoroutineExit'),
                      self.w_CoroutineExit)
        space.setitem(space.builtin.w_dict,
                      space.new_interned_str('CoroutineExit'),
                      self.w_CoroutineExit)

        # Should be moved to interp_stackless.py if it's ever implemented...
        self.w_TaskletExit = space.gettypefor(W_TaskletExit)
        space.setitem(
                      space.exceptions_module.w_dict,
                      space.new_interned_str('TaskletExit'),
                      self.w_TaskletExit)
        space.setitem(space.builtin.w_dict,
                      space.new_interned_str('TaskletExit'),
                      self.w_TaskletExit)
Example #2
0
 def __init__(self, space):
     BaseCoState.__init__(self)
     self.args_w = None
     self.space = space
     self.w_GreenletExit  = get(space, "GreenletExit")
     self.w_GreenletError = get(space, "GreenletError")
Example #3
0
 def __init__(self, space):
     BaseCoState.__init__(self)
     self.args_w = None
     self.space = space
     self.w_GreenletExit = get(space, "GreenletExit")
     self.w_GreenletError = get(space, "GreenletError")
Example #4
0
 def __init__(self, space):
     BaseCoState.__init__(self)
     self.w_tempval = space.w_None
     self.space = space
Example #5
0
 def __init__(self, space):
     BaseCoState.__init__(self)
     self.w_tempval = space.w_None
     self.space = space