Say I have: class MyClass(db.Model): foo1 = db.IntegerProperty() foo2 = db.IntegerProperty() foo3 = db.IntegerProperty()
obj = MyClass(foo1=100, foo2=200, foo3=300) I want to loop over foo values. I found that I can do: for x in [1, 2, 3]: print obj.__dict__['_foo%d' % x] Is this bad / subject to break? Is there a better way to do this? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
