Writing a code sample I find myself using the dict.update(dict) function quite often to do bulk adds of properties to an entity.
I realized that this can potentially have unsafe behavior (overriding protected fields such as 'id'), and additionally returns None which doesn't seem very pythonic or consistent with past APIs
Would it make sense to override this method within the datastore.entity.Entity class so that it
- returns an updated handle to the same object (for list comprehension/chaining), and
- does some sanity checking on the added properties?
Writing a code sample I find myself using the
dict.update(dict)function quite often to do bulk adds of properties to an entity.I realized that this can potentially have unsafe behavior (overriding protected fields such as 'id'), and additionally returns
Nonewhich doesn't seem very pythonic or consistent with past APIsWould it make sense to override this method within the
datastore.entity.Entityclass so that it