def intern(ns, name): from namespace import findOrCreate, intern as nsintern if isinstance(ns, types.ModuleType): return nsintern(ns, name) ns = findOrCreate(symbol(ns)) return nsintern(ns, name)
def intern(ns, name): from namespace import findOrCreate, intern as nsintern import new if isinstance(ns, new.module): return nsintern(ns, name) ns = findOrCreate(symbol(ns)) return nsintern(ns, name)