def release ( self ) : if self . errored : self . pool . delete_resource ( self ) else : self . pool . release ( self )
python dispose of object in loop
Releases this resource back to the pool it came from .
def release(self):
        """
        Releases this resource back to the pool it came from.
        """
        if self.errored:
            self.pool.delete_resource(self)
        else:
            self.pool.release(self)