(classname, readonly=True)
Add the convience methods for a Cocoa mapping type

    Used to add the basic collections.abc.Mapping or collections.abc.MutableMapping
    APIs to a Cocoa class that has an API simular to NSDictionary.
Add the convience methods for a Cocoa mapping type
Add the convience methods for a Cocoa mapping type
def addConvenienceForBasicMapping(classname, readonly=True):
    """
    Add the convience methods for a Cocoa mapping type

    Used to add the basic collections.abc.Mapping or collections.abc.MutableMapping
    APIs to a Cocoa class that has an API simular to NSDictionary.
    """
    addConvenienceForClass(classname,
        _CONVENIENCES_MAPPING_RO if readonly else _CONVENIENCES_MAPPING_RW)

    try:
        lst = CLASS_ABC[classname]
    except KeyError:
        lst = CLASS_ABC[classname] = []

    lst.append(collections_abc.Mapping if readonly else collections_abc.MutableMapping)
def addConvenienceForBasicMapping ( classname , readonly = True ) : addConvenienceForClass ( classname , _CONVENIENCES_MAPPING_RO if readonly else _CONVENIENCES_MAPPING_RW ) try : lst = CLASS_ABC [ classname ] except KeyError : lst = CLASS_ABC [ classname ] = [ ] lst . append ( collections_abc . Mapping if readonly else collections_abc . MutableMapping )