def _make_generic(of, coll):
    """Used to make a new Collection type, without that type having to be
    defined explicitly.  Generates a new type name using the item type and a
    'suffix' Collection class property.

    args:

        ``of=``\ *Record type*
            The type of values of the collection

        ``coll=``\ *Collection sub-class*
            The container class.
    """

    assert(issubclass(coll, Collection))
    key = (coll.__name__, "%s.%s" % (of.__module__, of.__name__))
    if key in GENERIC_TYPES:
        if GENERIC_TYPES[key].itemtype != of:
            raise exc.PropertyNotUnique(key=key)
    else:
        # oh, we get to name it?  Goodie!
        generic_name = "%s%s" % (of.__name__, coll.suffix)
        GENERIC_TYPES[key] = type(
            generic_name, (coll, _Generic), dict(itemtype=of, generic_key=key)
        )
        mod = sys.modules[of.__module__]
        if not hasattr(mod, generic_name):
            setattr(mod, generic_name, GENERIC_TYPES[key])
    return GENERIC_TYPES[key]
def _make_generic ( of , coll ) : assert ( issubclass ( coll , Collection ) ) key = ( coll . __name__ , "%s.%s" % ( of . __module__ , of . __name__ ) ) if key in GENERIC_TYPES : if GENERIC_TYPES [ key ] . itemtype != of : raise exc . PropertyNotUnique ( key = key ) else : generic_name = "%s%s" % ( of . __name__ , coll . suffix ) GENERIC_TYPES [ key ] = type ( generic_name , ( coll , _Generic ) , dict ( itemtype = of , generic_key = key ) ) mod = sys . modules [ of . __module__ ] if not hasattr ( mod , generic_name ) : setattr ( mod , generic_name , GENERIC_TYPES [ key ] ) return GENERIC_TYPES [ key ]
Used to make a new Collection type, without that type having to be
    defined explicitly.  Generates a new type name using the item type and a
    'suffix' Collection class property.

    args:

        ``of=``\ *Record type*
            The type of values of the collection

        ``coll=``\ *Collection sub-class*
            The container class.