Querying for Unique Ancestors of models in Google App Engine DS -


anyone have clean ways unique list of ancestors of entities of particular model?

eg if there class a, , class b(parent=a), can 1 find a's have b's

ended doing 1 liner;

a_with_b = set([b.parent() b in b.all(keys_only=true)]) #list comprehension 

fyi, in python 3,

a_with_b = {b.parent() b in b.all(keys_only=true)} #set comprehension 

Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -