2011/12/12 Victor Stinner <victor.stinner at haypocalc.com> > "When sorting a list using the sort() method, attempting to inspect or > mutate the content of the list will result in undefined behaviour." But is this even true? in listobject.c::listsort(), since 2002, /* The list is temporarily made empty, so that mutations performed * by comparison functions can't affect the slice of memory we're * sorting (allowing mutations during sorting is a core-dump * factory, since ob_item may change). */ So behaviour is not undefined at all... maybe this report is only based on note #10 of the documentation: http://docs.python.org/library/stdtypes.html#mutable-sequence-types and only considers python 2.2 or older... -- Amaury Forgeot d'Arc -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20111213/7595f764/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