demexp-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Demexp-dev] Sorting tag/question lists


From: Lyu Abe
Subject: Re: [Demexp-dev] Sorting tag/question lists
Date: Tue, 30 Oct 2007 10:02:57 +0900
User-agent: Thunderbird 2.0.0.6 (Windows/20070728)


tag_labels.sort(lambda x,y:cmp(x['var1'],['var1']))

Well, it should be:
  tag_labels.sort(lambda x,y:cmp(x['var1'],y['var1']))

The second 'y' was missing.

Yes, I figured that out ;) . And yes, Python is very convenient for that. Actually, I know Python and other similar languages have been designed also for this purpose... I just lack experience :/

        Regards, Lyu




reply via email to

[Prev in Thread] Current Thread [Next in Thread]