This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: list.sort does nothing when both cmp and key are given
Type: Stage:
Components: None Versions:
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: qrczak
Priority: normal Keywords:

Created on 2006-09-16 16:46 by qrczak, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg29850 - (view) Author: Marcin 'Qrczak' Kowalczyk (qrczak) Date: 2006-09-16 16:46
Python 2.5c1 (r25c1:51305, Sep  3 2006, 12:19:21)
[GCC 4.2.0 20060806 (experimental) (PLD-Linux)] on linux2
Type "help", "copyright", "credits" or "license" for
more information.
>>> x = [1, 200, 30]
>>> x.sort(lambda x, y: x<y, str)
>>> x
[1, 200, 30]
msg29851 - (view) Author: Marcin 'Qrczak' Kowalczyk (qrczak) Date: 2006-09-16 16:50
Logged In: YES 
user_id=50234

Oops, sorry, I forgot that cmp is a three-way comparison.
History
Date User Action Args
2022-04-11 14:56:20adminsetgithub: 43983
2006-09-16 16:46:46qrczakcreate