Virgil Stokes wrote:
> Here is snippet of Python (vers. 2.7.10) code that bothers me.
>
> import cPickle as pickle
>
> print "Pickle lists:"
> dogs = ['Rover','King','Spot','Rufus']
> cats = ['Mimi','Misty','Sasha']
>
> with open('pickle.dat', 'wb') as pfile:
> pickle.dump(dogs, pfile)
>
On 6 November 2015 at 12:53, Virgil Stokes wrote:
> Here is snippet of Python (vers. 2.7.10) code that bothers me.
>
> [snip bad code]
>
> 1) Which (the pickle or shelve code) takes less total RAM, if dogs and cats
> were very large?
> 2) When the last shelve.open is given, is the entire content
Here is snippet of Python (vers. 2.7.10) code that bothers me.
import cPickle as pickle
print "Pickle lists:"
dogs = ['Rover','King','Spot','Rufus']
cats = ['Mimi','Misty','Sasha']
with open('pickle.dat', 'wb') as pfile:
pickle.dump(dogs, pfile)
pickle.dump(cats,pfile)
del(dogs); del(c