code: def setdefault(self, key, defaultvalue = None):
          
          (t, k) = self._getsubitem(key, True)
          return t.__dict__.setdefault(k, defaultvalue)
docs: Support dict-like setdefault (create if not existed)