'@param attrs: a dict whose keys are the names of all the attributes to be persistently stored and whose values are the initial default value that the attribute gets set to the first time it is ever used;  After this first initialization, the value will be persistent so the initial default value will never be used again.
@param savecb: if not None, then it is a callable that will be called after each save completes (useful for unit tests) (savecb doesn\'t get called after a shutdown-save, only after a scheduled save)'

def __init__(self, fname, attrs, DELAY=(60 * 60), savecb=None):

    warnings.warn('deprecated', DeprecationWarning)
    nummedobj.NummedObj.__init__(self)
    self._DELAY = DELAY
    self._attrnames = attrs.keys()
    self._extres = PickleSaver.ExtRes(fname=fname, objname=self.__repr__())
    self._savecb = savecb
    for (attrname, defaultval) in attrs.items():
        setattr(self, attrname, defaultval)
    try:
        attrdict = pickle.loads(open(self._extres.fname, 'rb').read())
        for (attrname, attrval) in attrdict.items():
            if (not hasattr(self, attrname)):
                log.msg(('WARNING:    %s    has    no    attribute    named    %s    on    load    from    disk,    value:    %s.' % (self, attrname, attrval)))
            setattr(self, attrname, attrval)
    except (pickle.UnpicklingError, IOError, EOFError) as le:
        try:
            attrdict = pickle.loads(open((self._extres.fname + '.tmp'), 'rb').read())
            for (attrname, attrval) in attrdict.items():
                if (not hasattr(self, attrname)):
                    log.msg(('WARNING:    %s    has    no    attribute    named    %s    on    load    from    disk,    value:    %s.' % (self, attrname, attrval)))
                setattr(self, attrname, attrval)
        except (pickle.UnpicklingError, IOError, EOFError) as le2:
            log.msg(("Got    exception    attempting    to    load    attrs.        (This    is    normal    if    this    is    the    first    time    you've    used    this    persistent    %s    object.)        fname:    %s,    le:    %s,    le2:    %s" % (self.__class__, self._extres.fname, le, le2)))
    self.lazy_save()
