def clone(cls, old, update=()):
        "Creates a class preferring thread affinity after update."
        classdict = dict(old.__dict__)
        classdict.update(update)
        return cls(old.__name__, old.__bases__, classdict, old)
Creates a class preferring thread affinity after update.
recipes/Python/578152_threadboxpy/recipe-578152.py