Modify

Opened 7 years ago

Closed 23 months ago

Last modified 23 months 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 7 years ago by yattom

  • Resolution set to fixed
  • Status changed from new to closed

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

comment:2 Changed 7 years ago by coderanger

For future reference:

from trac.util.compat import sorted

comment:3 Changed 6 years ago by laughsmile

  • Resolution fixed deleted
  • Status changed from closed to 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 23 months ago by rjollos

  • Resolution set to fixed
  • Status changed from reopened to closed

(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 23 months ago by rjollos

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

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.