Is StopIteration a singleton?
Chris Angelico
rosuav at gmail.com
Thu Nov 20 23:23:46 EST 2014
More information about the Python-list mailing list
Thu Nov 20 23:23:46 EST 2014
- Previous message (by thread): Is StopIteration a singleton?
- Next message (by thread): Is StopIteration a singleton?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Fri, Nov 21, 2014 at 2:40 PM, Terry Reedy <tjreedy at udel.edu> wrote: > On 11/20/2014 12:09 AM, Steven D'Aprano wrote: > >> No idea. But you can marshal StopIteration itself, but not StopIteration >> instances: >> >> py> marshal.dumps(StopIteration) >> 'S' >> py> marshal.dumps(StopIteration()) >> Traceback (most recent call last): >> File "<stdin>", line 1, in <module> >> ValueError: unmarshallable object > > > Ditto for other exception classes I tried. I can't marshal any other exception instances, but I also can't marshal any other exception classes. StopIteration is special-cased, and I have no idea why. ChrisA
- Previous message (by thread): Is StopIteration a singleton?
- Next message (by thread): Is StopIteration a singleton?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list