[issue7831] cmp() is missing in 3.x

2010-02-02 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue7831] cmp() is missing in 3.x

2010-02-01 Thread Martin v . Löwis
Martin v. Löwis added the comment: I think this should be discussed on python-dev (I believe it *has* been discussed on python-dev, I just don't remember the outcome). Creating fixers is not feasible, I think. In any case, it's an issue different from the one you reported. -- __

[issue7831] cmp() is missing in 3.x

2010-02-01 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +Merwok ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org

[issue7831] cmp() is missing in 3.x

2010-02-01 Thread Florent Xicluna
Changes by Florent Xicluna : -- versions: -Python 2.6 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://ma

[issue7831] cmp() is missing in 3.x

2010-02-01 Thread Florent Xicluna
Florent Xicluna added the comment: Ok. Maybe we need a "-3" warning and/or a 2to3 fixer? -- components: +2to3 (2.x to 3.0 conversion tool) versions: +Python 2.6, Python 2.7 ___ Python tracker __

[issue7831] cmp() is missing in 3.x

2010-02-01 Thread Martin v . Löwis
Martin v. Löwis added the comment: No, cmp is not missing. It's intentionally removed, and won't come back. So closing this as "won't fix". I'm not sure what you are aiming at with the universal key function; if you want a key function that guarantees a total order, use key=id. -- no

[issue7831] cmp() is missing in 3.x

2010-02-01 Thread Florent Xicluna
Florent Xicluna added the comment: As a replacement, it could be useful to propose a "universal key" for sort() method and sorted() builtin. >>> lst = sorted([{2: '3'}, 1, '05'], key=list.ukey) >>> There's a reference implementation in the pprint._safe_key private class. -- __

[issue7831] cmp() is missing in 3.x

2010-02-01 Thread Florent Xicluna
New submission from Florent Xicluna : The cmp(a, b) function is missing in 3.0. This change is slightly documented in Doc/whatsnew/3.0.rst: "The cmp() function should be treated as gone." There's no "-3" warning and no 2to3 fixer for it. -- messages: 98680 nosy: flox priority: normal s