def __getitem__(self, key): lkey = sidex.variant.sdx_to_py(key) if sidex.sidex_HasKey(self.__sdxdoc.shandle, self.__grpname, lkey): if self.__sdxdoc.autocast: return sidex.variant.sdx_to_py(self.__sdxdoc.read_value(self.__grpname, lkey)) else: return self.__sdxdoc.read_value(self.__grpname, lkey) else: raise KeyError("invalid key %s" % lkey)
def has_key(self, name): return sidex.sidex_HasKey(self.__sdxdoc.shandle, self.__grpname, sidex.variant.sdx_to_py(name))
def __delitem__(self, key): lkey = sidex.variant.sdx_to_py(key) if sidex.sidex_HasKey(self.__sdxdoc.shandle, self.__grpname, lkey): sidex.sidex_DeleteKey(self.__sdxdoc.shandle, self.__grpname, lkey)