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/114944.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 vulnerabilitiesArmin Rigo arigo at tunes.org
Tue Dec 13 14:13:55 CET 2011
Hi,

On Tue, Dec 13, 2011 at 11:37, Amaury Forgeot d'Arc <amauryfa at gmail.com> wrote:
>> "When sorting a list using the sort() method, attempting to inspect or
>> mutate the content of the list will result in undefined behaviour."
>
> (...)
> So behaviour is not undefined at all...

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).


A bientôt,

Armin.
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