Message288262
I agree with Antoine that, "As the name suggests, __getstate__ should probably not mutate anything."
Unless a problematic non-mutating example can be found, I suggest this be closed. For the most part, our rule has been that pure python code doesn't have to (and possibly cannot) defend itself against mid-stream mutation, while C code only has to defend itself to the point of avoiding a segfault.
IMO, "RuntimeError: dictionary changed size during iteration" is an informative error message in this case. |
|
Date |
User |
Action |
Args |
2017-02-21 04:07:47 | rhettinger | set | recipients:
+ rhettinger, belopolsky, pitrou, alexandre.vassalotti, neologix, docs@python, Leo.Na, serhiy.storchaka |
2017-02-21 04:07:46 | rhettinger | set | messageid: <1487650066.92.0.378928809158.issue10701@psf.upfronthosting.co.za> |
2017-02-21 04:07:46 | rhettinger | link | issue10701 messages |
2017-02-21 04:07:46 | rhettinger | create | |
|