def with_env(cls, env):
        """Return a model (or recordset) equivalent to the current model
        (or recordset) attached to `env`.
        """
        new_cls = type(cls.__name__, cls.__bases__, dict(cls.__dict__))
        new_cls._env = env
        return new_cls
def with_env ( cls , env ) : new_cls = type ( cls . __name__ , cls . __bases__ , dict ( cls . __dict__ ) ) new_cls . _env = env return new_cls
Return a model (or recordset) equivalent to the current model
        (or recordset) attached to `env`.