> Is a copy.deepcopy ( -> "cPickle.dump(copy.deepcopy(obj),f)" ) an
> atomic opertion with a guarantee to not fail?
>
> Or can I only retry several times in case of RuntimeError? (which would
> apears to me as odd gambling; retry how often?)
For an intermediate solution, I'm playing roulette:
for i in 1,2,3:
try:
cPickle.dump(obj, f)
break
except RuntimeError,v:
pass
I hope this works for some million years ...
> PS: Zope dumps thread exposed data structes regularly. How does the ZODB
> in Zope handle dict/list changes during its pickling operations?
--
http://mail.python.org/mailman/listinfo/python-list