Quoting Tim Peters <tim.peters at gmail.com>: > That's because they never suffered from list's ill-advised > documentation effectively blessing mutation while iterating <0.5 > wink>. Ah. Interesting to know. So catching this is recommended when it's feasible? > > Set throws the same exception as dictionary does (presumably, the main > > container inside 'set' is a dictionary) > > > > Details of behaviour: > > The last one is extremely surprising: And it never actually happened, either. It's a transcription error on my part. I made a mistake when testing the dict.update version (I wrote "-y for y in x", instead of "(-y, None) for y in x"). When deleting that from the transcript, I also accidentally deleted the x.fromkeys() example. When I added that example back in, I put it in the wrong spot (after the x.update example, instead of before it). So, no, dict.update isn't randomly eating dictionary entries. Sorry 'bout the false alarm. . . Cheers, Nick.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4