2011/12/13 Armin Rigo <arigo at tunes.org> > No, the behavior _is_ undefined. The comment you cited says that it > cannot crash the Python interpreter; additionally, it makes a > best-effort attempt at catching such accesses and raising ValueError. > But I think I can build a strange-looking example where you mutate a > list during sorting and don't get a ValueError (although admittedly it > needs a lot of hacking to do that nowadays, e.g. multiple threads). > I'm interested to see how! The current implementation installs an empty array in the list, and the initial array is only held by a local variable in listsort(). even gc.get_referrers() can return the empty list... -- Amaury Forgeot d'Arc -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20111213/9c40a186/attachment.html>
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