
March 5, 2009
9:36 p.m.
Guido van Rossum wrote:
This was a bad idea (*), and I'd be happy to ban it -- but we'd probably have to bump the pickle protocol version in order to maintain backwards compatibility.
If you're talking about multiple calls to dump() on the same pickler, it might be a bad idea for a network connection, but I don't see anything wrong with using it on a file, and I find it useful to do so sometimes. Banning it would be excessive, IMO.
The exposition is unintentional but for historic reasons we can't just remove it. :-(
A compromise might be to provide a memo attribute that returns a wrapper around the underlying cache -- maybe with only a clear() method if that's all you want to support. -- Greg