[Tutor] Which should it be, lists, tuples, dictionary or files?
Alan Gauld
alan.gauld at btinternet.com
Tue Jan 3 12:28:36 CET 2012
On 03/01/12 07:31, Devin Jeanpierre wrote:
> It's probably worth mentioning that shelve is not secure; loading a
> saved shelf can involve executing arbitrary python code embedded
> inside it. This probably isn't important for this particular project,
> but maybe in the future, if you consider using shelf for something
> more security-conscious...
A good point, shelve should be treated more like an internal persistence
tool than a general purpose database. It's
fine if you know what you are storing but if random data
is being put into it there could be problems.
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
More information about the Tutor
mailing list