[google-appengine] Re: Access entity properties dynamically (like introspection)

2008-12-28 Thread boson
Thanks. I think that turned out to be more of a Python question than a GAE question. I'm using getattr(obj, 'foo_%d' % x), and it seems to be working fine. On Dec 28, 1:36 pm, Alexander Kojevnikov wrote: > You should not rely on the implementation details, they can change and > break your code

[google-appengine] Re: Access entity properties dynamically (like introspection)

2008-12-28 Thread Alexander Kojevnikov
You should not rely on the implementation details, they can change and break your code. The Model class has a properties() method: http://code.google.com/appengine/docs/datastore/modelclass.html#Model_properties To access the values of the properties you can use this code: for prop in obj.prope