• Guido van Rossum's avatar
    *Semantic change*: when unpickling the instance variables of an · d6ead328
    Guido van Rossum yazdı
    instance, use inst.__dict__.update(value) instead of a for loop with
    setattr() over the value.keys().  This is more consistent (the
    pickling doesn't use getattr() either but pickles inst.__dict__) and
    avoids problems with instances that have a __setattr__ hook.
    
    But it *is* a semantic change (because the setattr hook is no longer
    used).  So beware!
    d6ead328
pickle.py 25.3 KB