truecauses all records loaded from the shelve to be cached in memoryand automatically written back to the shelve when it is closedthis avoids manual write backs on changesbut can consume memory and make closing slow also note how shelve files are explicitly closed although we don' need to pass mode flags to shelve open (by default it creates the shelve if neededand opens it for reads and writes otherwise)some underlying keyed-access filesystems may require close call in order to flush output buffers after changes finallyhere are the shelve-based scripts on the jobcreatingchangingand fetching records the records are still dictionariesbut the database is now dictionary-like shelve which automatically retains its state in file between program runs\pp \previewpython make_db_shelve py \pp \previewpython dump_db_shelve py bob ={'pay' 'job''dev''age' 'name''bob smith'sue ={'pay' 'job''hdw''age' 'name''sue jones'sue jones \pp \previewpython update_db_shelve py \pp \previewpython dump_db_shelve py bob ={'pay' 'job''dev''age' 'name''bob smith'sue ={'pay' 'job''hdw''age' 'name''sue jones'tom ={'pay' 'job'none'age' 'name''tom'sue jones when we ran the update and dump scripts herewe added new record for key tom and increased sue' pay field by percent these changes are permanent because the record dictionaries are mapped to an external file by shelve (in factthis is particularly good script for sue--something she might consider scheduling to run oftenusing cron job on unixor startup folder or msconfig entry on windows what' in namethough it' surprisingly well-kept secretpython gets its name from the british tv comedy series monty python' flying circus according to python folkloreguido van rossumpython' creatorwas watching reruns of the show at about the same time he needed name for new language he was developing and as they say in show business"the rest is history because of this heritagereferences to the comedy group' work often show up in examples and discussion for instancethe name brian appears often in scriptsthe words spamlumberjackand shrubbery have special connotation to python usersand presentations are sometimes referred to as the spanish inquisition as ruleif python user starts using phrases that have no relation to realitythey're probably borrowed step storing records persistently