Modify

Opened 17 years ago

Closed 12 years ago

Last modified 12 years ago

#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 yattom

Resolution: fixed
Status: newclosed

(In [2476]) sorted() -> list.sort() fixed #1796

comment:2 Changed 17 years ago by Noah Kantrowitz

For future reference:

from trac.util.compat import sorted

comment:3 Changed 17 years ago by laughsmile

Resolution: fixed
Status: closedreopened

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 Ryan J Ollos

Resolution: fixed
Status: reopenedclosed

(In [12252]) Fixes #1796, #1797:

  • Updated macro for Trac 0.11+.
  • Renamed macro from NikoCale to NikoCalendar.
  • Macro is now installed as an egg.
  • Renamed 0.10 directory to trunk.

Macro should work with 0.11 through 1.0.

comment:5 Changed 12 years ago by Ryan J Ollos

(In [12253]) Fixes #1796, #1797: Reverted macro name to NikoCale for backward compatibility.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain yattom.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.