Modify ↓
#1796 closed enhancement (fixed)
sorted() requires Python2.4
Reported by: | yattom | Owned by: | yattom |
---|---|---|---|
Priority: | normal | Component: | NikoCaleMacro |
Severity: | normal | Keywords: | |
Cc: | Trac Release: | 0.10 |
Description
use list.sort()
Attachments (0)
Change History (5)
comment:1 Changed 17 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:3 Changed 17 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
I think there's still a bug exists in dates.sort().
my dates array's values before sorted : 4/23,4/21,4/22,4/27,4/26,4/19,4/20,4/24,4/25
after dates.sort() is executed,the array's values turned into: 4/23,4/24,4/25,4/26,4/27,4/19,4/20,4/21,4/22
so after I make the following change: dates.sort() -> dates.sort(lambda x,y: cmp((x.month*100+x.day), (y.month*100+y.day)))
It work well for me
comment:4 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
comment:5 Changed 12 years ago by
Note: See
TracTickets for help on using
tickets.
(In [2476]) sorted() -> list.sort() fixed #1796