/* 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:
and only considers python 2.2 or older...
--
Amaury Forgeot d'Arc