Miscellany
public python v1 · immutableclass Site(object): def __new__(cls, *args, **kwds): if kwds["path"]: try: class_ = __import__("pages." + kwds["path"], fromlist=[kwds["path"]).Page except ImportError: class_ = __import__("pages.notfound", fromlist=["notfound"]).Page else: class_ = __import__("pages.index", fromlist=["index"]).Page return class_()