Re: Iterating over marshal

2006-10-06 Thread Tim Lesher
On Oct 6, 4:19 pm, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > Tim Lesher wrote: > > I'm using the marshal library to unmarshal a file containing one or > > more objects. The canonical way seems to be: > > > objs = [] > > while 1: > > try: > > objs.append(marshal.load(fobj)) > > exc

Re: Iterating over marshal

2006-10-06 Thread Fredrik Lundh
Tim Lesher wrote: > I'm using the marshal library to unmarshal a file containing one or > more objects. The canonical way seems to be: > > objs = [] > while 1: > try: > objs.append(marshal.load(fobj)) > except EOFError: > break the canonical way to do this is to put the