Changes between Initial Version and Version 1 of Ticket #16397, comment 46


Ignore:
Timestamp:
03/24/16 15:36:58 (5 years ago)
Author:
mmezzarobba
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #16397, comment 46

    initial v1  
    11I don't understand what you are trying to do here, can someone please explain?
    22
    3 (In my understanding, calling `cmp` means you are asking for a ''total'' order on the elements of the parent where the comparison ends up taking place. As most parents don't admit such an order that is compatible with their structure, it is a bug to call `cmp` and expect a mathematically meaningful answer. In contrast, it is perfectly okay for `cmp` to implement any arbitrary total order, provided that rich comparisons are implemented too. And it is acceptable, though not ideal due to the issues with Python3, to call `cmp ` when you need to sort elements in an arbitrary way.)
     3(In my understanding, calling `cmp` means you are asking for a ''total'' order on the elements of the parent where the comparison ends up taking place. As most parents don't admit such an order that is compatible with their structure, it is a bug to call `cmp` and expect a mathematically meaningful answer. In contrast, it is perfectly okay for `cmp` to implement any arbitrary total order, provided that rich comparisons are implemented too. And it is acceptable, though not ideal due to the issues with Python3, to call `cmp` when you need to sort elements in an arbitrary way.)