Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #81169
| From | Terry Reedy <tjreedy@udel.edu> |
|---|---|
| Subject | Re: Is StopIteration a singleton? |
| Date | 2014-11-20 23:54 -0500 |
| References | <mailman.16002.1416448354.18130.python-list@python.org> <546d77a5$0$12899$c3e8da3$5496439d@news.astraweb.com> <m4mc7n$mka$1@ger.gmane.org> <CAPTjJmofghCkhNQd2DFtNe-3HVABteKDN-4DxoT716xHXnEM4Q@mail.gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.16083.1416545723.18130.python-list@python.org> (permalink) |
On 11/20/2014 11:23 PM, Chris Angelico wrote: > On Fri, Nov 21, 2014 at 2:40 PM, Terry Reedy <tjreedy@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. Sorry I was unclear. I meant ditto ValueError for all other classes. -- Terry Jan Reedy
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
Is StopIteration a singleton? Chris Angelico <rosuav@gmail.com> - 2014-11-20 12:52 +1100
Re: Is StopIteration a singleton? Steven D'Aprano <steve@pearwood.info> - 2014-11-20 05:09 +0000
Re: Is StopIteration a singleton? Chris Angelico <rosuav@gmail.com> - 2014-11-20 16:16 +1100
Re: Is StopIteration a singleton? Terry Reedy <tjreedy@udel.edu> - 2014-11-20 22:40 -0500
Re: Is StopIteration a singleton? Chris Angelico <rosuav@gmail.com> - 2014-11-21 15:23 +1100
Re: Is StopIteration a singleton? Terry Reedy <tjreedy@udel.edu> - 2014-11-20 23:54 -0500
csiph-web