You only create the query you have to execute it to fetch the objects. If you print your object_a variable you will see it is a Query object.
# you have to use the same limit number, or leave it out of the query objects = object_a.fetch(200) objects.extend(object_b.fetch(200)) for object in objects: object.something = "this" It is not good practice to give a variable the name of a known python type (here: list) for object in list: object.something = "this" 2009/3/7 Draive <ashdown...@gmail.com>: > > Hi guys, > > I'm trying to put together a list of various objects. There are about > 5 different classes of objects I need to put in the list then iterate > through. > > It looks like this: > > class Stuff(db.Model): > something= db.StringProperty() > > class Object_A(Stuff): > pass > > class Object_B(Stuffl): > pass > > object_a = db.GqlQuery("SELECT * " > "FROM GroupA"+ > " ORDER BY timestamp ASC LIMIT 200") > > object_b = db.GqlQuery("SELECT * " > "FROM GroupB"+ > " ORDER BY timestamp ASC LIMIT 200") > > > Both a and b inherit from the same class and are very similar. > > What I need is to be able to put these in a list then iterate through > the list like... > > for object in list: > object.something = "this" > > > > the problem is that when I try to set something it gives me errors. > When however I just do objects "a" or objects "b" by themselves its > fine. > > Any pointers on how to create that list? > > Thanks in advance, > -d > > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~----------~----~----~----~------~----~------~--~---