Re: [Python-Dev] Iterating over marshal/pickle

2006-10-09 Thread M.-A. Lemburg
Fredrik Lundh wrote: > Tim Lesher wrote: > >> 1. Does this seem like a reasonable addition to the standard library? > > I cannot remember ever doing this, or seeing anyone except Perforce > doing this, and it'll only save you a few lines of code every other year > or so, so my answer is definit

Re: [Python-Dev] Iterating over marshal/pickle

2006-10-09 Thread Barry Warsaw
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Oct 9, 2006, at 11:28 AM, Fredrik Lundh wrote: >> 1. Does this seem like a reasonable addition to the standard library? > > I cannot remember ever doing this, or seeing anyone except Perforce > doing this, and it'll only save you a few lines of cod

Re: [Python-Dev] Iterating over marshal/pickle

2006-10-09 Thread Fredrik Lundh
Tim Lesher wrote: > 1. Does this seem like a reasonable addition to the standard library? I cannot remember ever doing this, or seeing anyone except Perforce doing this, and it'll only save you a few lines of code every other year or so, so my answer is definitely no. (if you're serious about

[Python-Dev] Iterating over marshal/pickle

2006-10-09 Thread Tim Lesher
Both marshal and pickle allow multiple objects to be serialized to the same file-like object. The pattern for deserializing an unknown number of serialized objects looks like this: objs = [] while True: try: objs.append(marshal.load(fobj)) # or objs.append(unpickler.load()) except EOFErro