(doc_type)
Given the doc_type of a document class, get the class itself.

    Raises a DocumentClassNotFound if not found
Given the doc_type of a document class, get the class itself.
Given the doc_type of a document class get the class itself .
def get_document_class_by_doc_type(doc_type):
    """
    Given the doc_type of a document class, get the class itself.

    Raises a DocumentClassNotFound if not found
    """

    try:
        return get_classes_by_doc_type()[doc_type]
    except KeyError:
        raise DocumentClassNotFound(
            'No Document class with name "{}" could be found.'.format(doc_type))
def get_document_class_by_doc_type ( doc_type ) : try : return get_classes_by_doc_type ( ) [ doc_type ] except KeyError : raise DocumentClassNotFound ( 'No Document class with name "{}" could be found.' . format ( doc_type ) )