(cls, name_or_ptr)
return super().__new__(cls, ptr)
The constructor accepts either the name of an Objective-C metaclass to look up
        (as :class:`str` or :class:`bytes`), or a pointer to an existing metaclass object
        (in any form accepted by :class:`ObjCInstance`).

        If given a pointer, it must refer to an Objective-C metaclass; pointers to other objects are not accepted.
        (Use :class:`ObjCInstance` to wrap a pointer that might also refer to other kinds of objects.)
        Creating an :class:`ObjCMetaClass` from a ``Nil`` pointer returns ``None``.
The constructor accepts either the name of an Objective-C metaclass to look up
        (as :class:`str` or :class:`bytes`), or a pointer to an existing metaclass object
        (in any form accepted by :class:`ObjCInstance`).
The constructor accepts either the name of an Objective - C metaclass to look up ( as : class : str or : class : bytes ) or a pointer to an existing metaclass object ( in any form accepted by : class : ObjCInstance ) .
def __new__(cls, name_or_ptr):
        """The constructor accepts either the name of an Objective-C metaclass to look up
        (as :class:`str` or :class:`bytes`), or a pointer to an existing metaclass object
        (in any form accepted by :class:`ObjCInstance`).

        If given a pointer, it must refer to an Objective-C metaclass; pointers to other objects are not accepted.
        (Use :class:`ObjCInstance` to wrap a pointer that might also refer to other kinds of objects.)
        Creating an :class:`ObjCMetaClass` from a ``Nil`` pointer returns ``None``.
        """

        if isinstance(name_or_ptr, (bytes, str)):
            name = ensure_bytes(name_or_ptr)
            ptr = libobjc.objc_getMetaClass(name)
            if ptr.value is None:
                raise NameError("Objective-C metaclass {} not found".format(name))
        else:
            ptr = cast(name_or_ptr, Class)
            if ptr.value is None:
                raise ValueError("Cannot create ObjCMetaClass for nil pointer")
            elif not object_isClass(ptr) or not libobjc.class_isMetaClass(ptr):
                raise ValueError("Pointer {} ({:#x}) does not refer to a metaclass".format(ptr, ptr.value))

        return super().__new__(cls, ptr)
def __new__ ( cls , name_or_ptr ) : if isinstance ( name_or_ptr , ( bytes , str ) ) : name = ensure_bytes ( name_or_ptr ) ptr = libobjc . objc_getMetaClass ( name ) if ptr . value is None : raise NameError ( "Objective-C metaclass {} not found" . format ( name ) ) else : ptr = cast ( name_or_ptr , Class ) if ptr . value is None : raise ValueError ( "Cannot create ObjCMetaClass for nil pointer" ) elif not object_isClass ( ptr ) or not libobjc . class_isMetaClass ( ptr ) : raise ValueError ( "Pointer {} ({:#x}) does not refer to a metaclass" . format ( ptr , ptr . value ) ) return super ( ) . __new__ ( cls , ptr )