(objcclass)
return pytype
Look up the :class:`ObjCInstance` subclass used to represent instances of the given Objective-C class in Python.

    If the exact Objective-C class is not registered, each superclass is also checked,
    defaulting to :class:`ObjCInstance` if none of the classes in the superclass chain is registered.
    Afterwards, all searched superclasses are registered for the :class:`ObjCInstance` subclass that was found.
    (This speeds up future lookups, and ensures that previously computed mappings are not changed
    by unrelated registrations.)

    This method is mainly intended for internal use by Rubicon, but is exposed in the public API for completeness.
Look up the :class:`ObjCInstance` subclass used to represent instances of the given Objective-C class in Python.
Look up the : class : ObjCInstance subclass used to represent instances of the given Objective - C class in Python .
def type_for_objcclass(objcclass):
    """Look up the :class:`ObjCInstance` subclass used to represent instances of the given Objective-C class in Python.

    If the exact Objective-C class is not registered, each superclass is also checked,
    defaulting to :class:`ObjCInstance` if none of the classes in the superclass chain is registered.
    Afterwards, all searched superclasses are registered for the :class:`ObjCInstance` subclass that was found.
    (This speeds up future lookups, and ensures that previously computed mappings are not changed
    by unrelated registrations.)

    This method is mainly intended for internal use by Rubicon, but is exposed in the public API for completeness.
    """

    if isinstance(objcclass, ObjCClass):
        objcclass = objcclass.ptr

    superclass = objcclass
    traversed_classes = []
    pytype = ObjCInstance
    while superclass.value is not None:
        try:
            pytype = _type_for_objcclass_map[superclass.value]
        except KeyError:
            traversed_classes.append(superclass)
            superclass = libobjc.class_getSuperclass(superclass)
        else:
            break

    for cls in traversed_classes:
        register_type_for_objcclass(pytype, cls)

    return pytype
def type_for_objcclass ( objcclass ) : if isinstance ( objcclass , ObjCClass ) : objcclass = objcclass . ptr superclass = objcclass traversed_classes = [ ] pytype = ObjCInstance while superclass . value is not None : try : pytype = _type_for_objcclass_map [ superclass . value ] except KeyError : traversed_classes . append ( superclass ) superclass = libobjc . class_getSuperclass ( superclass ) else : break for cls in traversed_classes : register_type_for_objcclass ( pytype , cls ) return pytype