A RetroSearch Logo

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

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/attachments/20111213/7595f764/attachment.html below:

<div class="gmail_quote">2011/12/12 Victor Stinner <span dir="ltr">&lt;<a href="mailto:victor.stinner@haypocalc.com">victor.stinner@haypocalc.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
&quot;When sorting a list using the sort() method, attempting to inspect or mutate the content of the list will result in undefined behaviour.&quot;</blockquote></div><br>But is this even true? in listobject.c::listsort(), since 2002,<div>
<div><div>/* The list is temporarily made empty, so that mutations performed</div><div> * by comparison functions can&#39;t affect the slice of memory we&#39;re</div><div> * sorting (allowing mutations during sorting is a core-dump</div>
<div> * factory, since ob_item may change).</div><div> */</div><div>So behaviour is not undefined at all... maybe this report is only based on note #10 of the documentation:</div><div><a href="http://docs.python.org/library/stdtypes.html#mutable-sequence-types">http://docs.python.org/library/stdtypes.html#mutable-sequence-types</a></div>
<div>and only considers python 2.2 or older...</div><div><br></div>-- <br>Amaury Forgeot d&#39;Arc<br>
</div></div>

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