[issue12324] [3.2] sorted(big dict)

2011-06-13 Thread DDarko
DDarko added the comment: I am interested in sorting only by INT0, in this example: {k: [INT0, INT1, DICT], k: [INT0, INT1, DICT], ...} not cmp. whole lists. Unfortunately I can not take advantage of .values() as the keys I need. -- ___ Python track

[issue12324] [3.2] sorted(big dict)

2011-06-13 Thread Mark Dickinson
Mark Dickinson added the comment: > In this example, I'm sort by item number 1, which is a list, and its > first value is an int. ? You're sorting by the values of the dict d, and those values have the form [int, int, dict]; so when the two ints match (e.g., in your data, there are two valu

[issue12324] [3.2] sorted(big dict)

2011-06-13 Thread DDarko
DDarko added the comment: Sure. I know what's going on. Sorry for the inconvenience. -- ___ Python tracker ___ ___ Python-bugs-list m

[issue12324] [3.2] sorted(big dict)

2011-06-13 Thread DDarko
DDarko added the comment: I am aware of this change. In this example, I'm sort by item number 1, which is a list, and its first value is an int. $ python3 sort_test.py ... Dict index is always No. 2. But I do not sort it. That's why it surprised me this error because nowhere dicts shou

[issue12324] [3.2] sorted(big dict)

2011-06-13 Thread Mark Dickinson
Mark Dickinson added the comment: This is expected behaviour: Python 3 changed the semantics of the comparison operators <, <=, >, >=. See: http://docs.python.org/py3k/whatsnew/3.0.html#ordering-comparisons for more. -- nosy: +mark.dickinson resolution: -> invalid status: open ->

[issue12324] [3.2] sorted(big dict)

2011-06-13 Thread DDarko
New submission from DDarko : I added an example to reproduce the bug. >From the command line the same code: Python 2.7.1+ (r271:86832, Apr 11 2011, 18:05:24) [GCC 4.5.2] on linux2 $ python sort_test.py Everything fine. Python 3.2 (r32:88445, Mar 25 2011, 19:28:28) [GCC 4.5.2] on linux2 $ pyth