code: def nonDefaults(self):
          
          nonDefaults = {}
          for k, d in self.__class__.defaults.items():
              v = getattr(self, k)
              if v != d and (v == v or d == d):  # tests for NaN too
                  nonDefaults[k] = v
          return nonDefaults
docs: Get a dictionary of all attributes that differ from the default.