Ticket #1796 (closed enhancement: fixed)

Opened 6 years ago

Last modified 7 months ago

sorted() requires Python2.4

Reported by: yattom Assigned to: yattom
Priority: normal Component: NikoCaleMacro
Severity: normal Keywords:
Cc: Trac Release: 0.10

Description

use list.sort()

Attachments

Change History

07/16/07 00:49:43 changed by yattom

  • status changed from new to closed.
  • resolution set to fixed.

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

07/16/07 01:48:51 changed by coderanger

For future reference:

from trac.util.compat import sorted

04/22/08 04:41:35 changed by laughsmile

  • status changed from closed to reopened.
  • resolution deleted.

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

10/24/12 10:28:16 changed by rjollos

  • status changed from reopened to closed.
  • resolution set to fixed.

(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.

10/24/12 10:32:39 changed by rjollos

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


Add/Change #1796 (sorted() requires Python2.4)




Change Properties
Action