On Aug 19, 2008, at 2:19 PM, johnf wrote:

> I ask because I bet you are just getting a dataset and then doing  
> the massage
> to return choices and keys.  And I bet this happens all the time.   
> Why not a
> simple way to use dataset directly.


names = [rec["typename"] for rec in ds]
keys = [rec["pk"] for rec in ds]

        How much simpler do you want it?

        Perhaps adding a "KeyChoices" property that accepts a list (k,v)  
tuples and resolves them to the separate Keys and Choices props? Then  
you could shorten the above code to a single line. But I don't see  
what the big savings would be.
                

-- Ed Leafe





_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/[EMAIL PROTECTED]

Reply via email to