Thanks, but still no luck. What method name should I provide? I tried datetime.millis, datetime, and datetime.timeTime (all with no (), I was just passing the reference) -jim ----- Original Message ----- From: "Dieter Maurer" <dieter@handshake.de> To: "Jim Kutter" <zope-list@ebizq.net> Cc: <zope@zope.org> Sent: Friday, November 08, 2002 5:11 PM Subject: Re: [Zope] Sort DateTime objects?
Jim Kutter writes:
I have a product with a class that contains a DateTime object with the name datetime (I know, bad choice, but the choice has been made...)
So I want to sort a collection of these objects by ascending date. So I get all objects of that type into a list called "events" then use the sequence module
So this is my basic logic - sorted = sequence.sort(events, (('datetime.x()', 'cmp', 'asc'),)) ^^^^^^^^^^^^ This must be the name of an attribute or parameterless method, not the method call itself. Use "x" alone.
Dieter