(doc)
Return True if a document was deleted via the UndoableDocument.soft_delete mechanism.

    Returns False otherwise.
Return True if a document was deleted via the UndoableDocument.soft_delete mechanism.
Return True if a document was deleted via the UndoableDocument . soft_delete mechanism .
def is_deleted(doc):
    """
    Return True if a document was deleted via the UndoableDocument.soft_delete mechanism.

    Returns False otherwise.
    """
    try:
        return doc and doc['doc_type'].endswith(DELETED_SUFFIX)
    except KeyError:
        return False
def is_deleted ( doc ) : try : return doc and doc [ 'doc_type' ] . endswith ( DELETED_SUFFIX ) except KeyError : return False