[Tutor] OT: Notion of persistence in Python

alan.gauld@bt.com alan.gauld@bt.com
Tue Oct 29 18:13:17 2002


> If this is terribly OT, I apologize. I've been googling the web for
> information on persistence. 

In its most geneal sense persistence refers to maintaining state beyond 
a program's lifetime. More commonly nowadays it refers to persisting object
state beyond an objects lifetime. In Python that is most easily achieved 
using the pickle module.

The next step up is to use the shelve module and then you move into 
the realm of databases.

> Is this a notion that is not Pythonic, wrt the use of the 
> language? 

Its supported in Python as described above and is a valid concern 
in any language, but especially OOP ones.

Alan g.
Author of the 'Learning to Program' web site
http://www.freenetpages.co.uk/hp/alan.gauld