entity.py
branchstable
changeset 7210 29cd85f20ccb
parent 7200 81fd6e40a6a8
child 7213 7644e68c4e9f
--- a/entity.py	Mon Apr 11 18:33:18 2011 +0200
+++ b/entity.py	Tue Apr 12 13:05:16 2011 +0200
@@ -913,9 +913,7 @@
         assert kwargs
         assert self.cw_is_saved(), "should not call set_attributes while entity "\
                "hasn't been saved yet"
-        relations = []
-        for key in kwargs:
-            relations.append('X %s %%(%s)s' % (key, key))
+        relations = ['X %s %%(%s)s' % (key, key) for key in kwargs]
         # and now update the database
         kwargs['x'] = self.eid
         self._cw.execute('SET %s WHERE X eid %%(x)s' % ','.join(relations),