You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently DataObject.init does "self.dict.update(**kwargs)". In my application I've got some specialized Field types that want to do some particular handling via set when data is assigned to them, but init's direct assignment to self.dict bypasses the Field descriptor.
Is there any reason why the dict update couldn't be replaced by "for k, v in kwargs.iteritems(): setattr(self, k, v)" so it would go through Fields? I've done this as a subclass override for my application and it seems to work fine. I can move it upstream and put together a pull request if a maintainer comments here that the idea is acceptable.
The text was updated successfully, but these errors were encountered:
Currently DataObject.init does "self.dict.update(**kwargs)". In my application I've got some specialized Field types that want to do some particular handling via set when data is assigned to them, but init's direct assignment to self.dict bypasses the Field descriptor.
Is there any reason why the dict update couldn't be replaced by "for k, v in kwargs.iteritems(): setattr(self, k, v)" so it would go through Fields? I've done this as a subclass override for my application and it seems to work fine. I can move it upstream and put together a pull request if a maintainer comments here that the idea is acceptable.
The text was updated successfully, but these errors were encountered: