Hi, I am using an Expando class and I want to sort it.
It needs to be sorted according to a dynamically assigned property so
it has o be done at runtime.

I am using python and it could be done easily with something like:

        dates = sorted(datelist, key=itemgetter('comp_date'))

But since the objects returned from the datastore are not iterable
this is impossible.

So I thought that I would just create my own list of dicts and then I
can iterate and sort it, but alas that is not possible either.



I can iterate over the primary just fine

        for date in datesfromdb:
            datelist.append(dict(date))

but no matter how I try to get the data out of the date object I have
no luck.
I dont want to name all the properties of the model since that would
make it a big pain to update anything, but how then do I do it?

Any help would be appreciated.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to