def handle_return(self, frame, return_value):
        """This function is called when a return trap is set here."""
        self.obj_cache[id(return_value)] = return_value
        self.extra_vars['__return__'] = return_value
        fun = frame.f_code.co_name
        log.info('Returning from %r with value: %r' % (fun, return_value))

        init = 'Echo|%s' % dump({
            'for': '__return__',
            'val': self.safe_better_repr(return_value)
        })
        self.interaction(
            frame,
            init=init,
            exception_description='Returning from %s with value %s' %
            (fun, return_value)
        )
def handle_return ( self , frame , return_value ) : self . obj_cache [ id ( return_value ) ] = return_value self . extra_vars [ '__return__' ] = return_value fun = frame . f_code . co_name log . info ( 'Returning from %r with value: %r' % ( fun , return_value ) ) init = 'Echo|%s' % dump ( { 'for' : '__return__' , 'val' : self . safe_better_repr ( return_value ) } ) self . interaction ( frame , init = init , exception_description = 'Returning from %s with value %s' % ( fun , return_value ) )
This function is called when a return trap is set here.