docs: def update(self, d):
          """Works like regular update, but only actually updates when the new
          value and the old value differ. This is necessary to prevent
          certain infinite loops.
  
          :arg d: a dictionary
  
          """
          for (k, v) in d.items():
              if k not in self or self[k] != v:
                  self[k] = v