On Wed, May 14, 2008 at 3:45 AM, Mark <[EMAIL PROTECTED]> wrote: > i want to set the keys of the user row as the keys of User self > but i m not sure how to do it > > for i in self._user.keys(): > self[i]=self._user[i]
Should be setattr(self, i, self._user[i]) > You can do something like > > self.update(_user) Should be self.__dict__.update(self._user) You should probably consider an existing object-relation mapper such as SQLAlchemy, SQLObject or Django ORM rather than rolling your own. Kent _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor