A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2011-December/114943.html below:

[Python-Dev] IEEE/ISO draft on Python vulnerabilities

[Python-Dev] IEEE/ISO draft on Python vulnerabilities [Python-Dev] IEEE/ISO draft on Python vulnerabilitiesAmaury Forgeot d'Arc amauryfa at gmail.com
Tue Dec 13 11:37:32 CET 2011
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>
More information about the Python-Dev mailing list

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