def get_object_class(object_type, vendor_id=0):
    """Return the class associated with an object type."""
    if _debug: get_object_class._debug("get_object_class %r vendor_id=%r", object_type, vendor_id)

    # find the klass as given
    cls = registered_object_types.get((object_type, vendor_id))
    if _debug: get_object_class._debug("    - direct lookup: %s", repr(cls))

    # if the class isn't found and the vendor id is non-zero, try the standard class for the type
    if (not cls) and vendor_id:
        cls = registered_object_types.get((object_type, 0))
        if _debug: get_object_class._debug("    - default lookup: %s", repr(cls))

    return cls
def get_object_class ( object_type , vendor_id = 0 ) : if _debug : get_object_class . _debug ( "get_object_class %r vendor_id=%r" , object_type , vendor_id ) cls = registered_object_types . get ( ( object_type , vendor_id ) ) if _debug : get_object_class . _debug ( "    - direct lookup: %s" , repr ( cls ) ) if ( not cls ) and vendor_id : cls = registered_object_types . get ( ( object_type , 0 ) ) if _debug : get_object_class . _debug ( "    - default lookup: %s" , repr ( cls ) ) return cls
Return the class associated with an object type.