class in this last session python is smart enough to link this object back to its original class when unpickledsuch that all the original methods are available through fetched objects changing classes of objects stored in shelves technicallypython reimports class to re-create its stored instances as they are fetched and unpickled here' how this worksstore when python pickles class instance to store it in shelveit saves the instance' attributes plus reference to the instance' class in effectpickled class instances in the prior example record the self attributes assigned in the class reallypython serializes and stores the instance' __dict__ attribute dictionary along with enough source file information to be able to locate the class' module later--the names of the instance' class as well as its class' enclosing module fetch when python unpickles class instance fetched from shelveit re-creates the instance object in memory by reimporting the class using the save class and module name stringsassigning the saved attribute dictionary to new empty instanceand linking the instance back to the class this is be defaultand it can be tailored by defining special methods that will be called by pickle to fetch and store instance state (see the python library manual for detailsthe key point in this is that the class and stored instance data are separate the class itself is not stored with its instancesbut is instead located in the python source file and reimported later when instances are fetched the downside of this model is that the class must be importable to load instances off shelve (more on this in momentthe upside is that by modifying external classes in module fileswe can change the way stored objectsdata is interpreted and used without actually having to change those stored objects it' as if the class is program that processes stored records to illustratesuppose the person class from the previous section was changed to the source code in example - example - pp \dbase\person py (version "" person objectfields behavior changethe tax method is now computed attribute ""class persondef __init__(selfnamejobpay= )self name name databases and persistence