[issue12286] float('nan') breaks sort() method on a list of floats

2011-06-08 Thread Johann C. Rocholl
New submission from Johann C. Rocholl jcroch...@google.com: l = [1.0, 2.0, 3.0, float('nan'), 4.0, 3.0, 2.0, 1.0] l.sort() l [1.0, 2.0, 3.0, nan, 1.0, 2.0, 3.0, 4.0] The expected result is either of the following: [nan, 1.0, 1.0, 2.0, 2.0, 3.0, 3.0, 4.0] (similar to None) [1.0, 1.0, 2.0,

[issue12286] float('nan') breaks sort() method on a list of floats

2011-06-08 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: This is expected. See also #11986 and #11949. -- nosy: +belopolsky, ezio.melotti, mark.dickinson, rhettinger resolution: - invalid stage: - committed/rejected status: open - closed ___ Python

[issue12286] float('nan') breaks sort() method on a list of floats

2011-06-08 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: This is actually a duplicate of issue7915. I don't think there is nothing we can do to improve the situation. In fact discussion at #11949 ends with a +0 from Mark Dickinson to issue a warning whenever nans participate