[issue7915] A lists which list.sort seems to leave out of order.
New submission from Alex Coventry throwa...@mit.edu: I feel like I must be on crack, here. I apologize if so. English version: sorting this long list leaves in place element 580395, which is less than element 0. Restricting to a list of just those two elements, sorting does what I'd expect. met% python2.6 # This problem also happens with 2.5 Python 2.6b1+ (trunk:64955, Jul 14 2008, 17:23:39) [GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2 Type help, copyright, credits or license for more information. import os, cPickle t = cPickle.load(os.popen('gunzip -c list.pickle.gz')) # Load the pickle in. It's a list of pairs of numbers t.sort() # Sort the pickle t[580395] t[0] # It's not in order! True u = [t[0], t[580395]] # Make a list of just the two compared elements and sort u.sort() u == [t[580395], t[0]] # Now it's in order! True -- files: list.pickle.gz messages: 99249 nosy: throwaway severity: normal status: open title: A lists which list.sort seems to leave out of order. type: behavior versions: Python 2.5, Python 2.6 Added file: http://bugs.python.org/file16216/list.pickle.gz ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7915 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7915] A lists which list.sort seems to leave out of order.
Ezio Melotti ezio.melo...@gmail.com added the comment: Could you provide the list in another format (e.g. in a plain .py script or as a .txt file)? -- nosy: +ezio.melotti priority: - normal stage: - test needed versions: -Python 2.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7915 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7915] A lists which list.sort seems to leave out of order.
Changes by Ezio Melotti ezio.melo...@gmail.com: Removed file: http://bugs.python.org/file16216/list.pickle.gz ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7915 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7915] A lists which list.sort seems to leave out of order.
Alex Coventry throwa...@mit.edu added the comment: No. It's 10M, gzipped. It's constructed from genome-wide association data, which is also huge, intrinsically complex, and protected by rules regarding research on humans. If the bug tracker won't take it do I have any other options? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7915 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7915] A lists which list.sort seems to leave out of order.
Alex Coventry throwa...@mit.edu added the comment: Oh, I guess I could make it a gzipped text file. Hang on. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7915 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7915] A lists which list.sort seems to leave out of order.
Thomas Wouters tho...@python.org added the comment: You have a nan in your list of tuples, which screws up the sorting. After the first sort, elements 580395-7 are: (0.99257340581672904, 551095), (nan, 551371), (6.6494600485570754e-14, 551526), -- nosy: +twouters resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7915 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7915] A lists which list.sort seems to leave out of order.
Changes by Ezio Melotti ezio.melo...@gmail.com: -- stage: test needed - committed/rejected ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7915 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7915] A lists which list.sort seems to leave out of order.
Alex Coventry throwa...@mit.edu added the comment: Ah, I guess I *was* on crack. Thanks for the explanation. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7915 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com