src/basilisp/lang/runtime.py
def __get_or_create(
        ns_cache: NamespaceMap,
        name: sym.Symbol,
        module: types.ModuleType = None,
        core_ns_name=CORE_NS,
    ) -> lmap.Map:
        """Private swap function used by `get_or_create` to atomically swap
        the new namespace map into the global cache."""
        ns = ns_cache.entry(name, None)
        if ns is not None:
            return ns_cache
        new_ns = Namespace(name, module=module)
        if name.name != core_ns_name:
            core_ns = ns_cache.entry(sym.symbol(core_ns_name), None)
            assert core_ns is not None, "Core namespace not loaded yet!"
            new_ns.refer_all(core_ns)
        return ns_cache.assoc(name, new_ns)
def __get_or_create(
        ns_cache: NamespaceMap,
        name: sym.Symbol,
        module: types.ModuleType = None,
        core_ns_name=CORE_NS,
    ) -> lmap.Map:
        """Private swap function used by `get_or_create` to atomically swap
        the new namespace map into the global cache."""
        ns = ns_cache.entry(name, None)
        if ns is not None:
            return ns_cache
        new_ns = Namespace(name, module=module)
        if name.name != core_ns_name:
            core_ns = ns_cache.entry(sym.symbol(core_ns_name), None)
            assert core_ns is not None, "Core namespace not loaded yet!"
            new_ns.refer_all(core_ns)
        return ns_cache.assoc(name, new_ns)
def __get_or_create ( ns_cache : NamespaceMap , name : sym . Symbol , module : types . ModuleType = None , core_ns_name = CORE_NS , ) -> lmap . Map : ns = ns_cache . entry ( name , None ) if ns is not None : return ns_cache new_ns = Namespace ( name , module = module ) if name . name != core_ns_name : core_ns = ns_cache . entry ( sym . symbol ( core_ns_name ) , None ) assert core_ns is not None , "Core namespace not loaded yet!" new_ns . refer_all ( core_ns ) return ns_cache . assoc ( name , new_ns )
Private swap function used by `get_or_create` to atomically swap
        the new namespace map into the global cache.
Private swap function used by get_or_create to atomically swap the new namespace map into the global cache .