descriptors/Descriptor.py
def exc_thrown_by_descriptor():
        """Return True if the last exception was thrown by a
        Descriptor instance.

        """
        traceback = sys.exc_info()[2]
        tb_locals = traceback.tb_frame.f_locals
        # relying on naming convention to get the object that threw
        # the exception
        if "self" in tb_locals:
            if not isinstance(tb_locals["self"], Descriptor):
                return False
            return True
        return False
def exc_thrown_by_descriptor():
        """Return True if the last exception was thrown by a
        Descriptor instance.

        """
        traceback = sys.exc_info()[2]
        tb_locals = traceback.tb_frame.f_locals
        # relying on naming convention to get the object that threw
        # the exception
        if "self" in tb_locals:
            if not isinstance(tb_locals["self"], Descriptor):
                return False
            return True
        return False
def exc_thrown_by_descriptor ( ) : traceback = sys . exc_info ( ) [ 2 ] tb_locals = traceback . tb_frame . f_locals # relying on naming convention to get the object that threw # the exception if "self" in tb_locals : if not isinstance ( tb_locals [ "self" ] , Descriptor ) : return False return True return False
Return True if the last exception was thrown by a
        Descriptor instance.
Return True if the last exception was thrown by a Descriptor instance .