部分移植

This commit is contained in:
2025-10-19 00:01:53 +08:00
parent e77210efc6
commit ace6197231
12 changed files with 122 additions and 108 deletions

View File

@@ -117,11 +117,11 @@ class Electron:
if key in self.algodata[self.algo]:
return self.algodata[self.algo][key]
else:
raise KeyError(f"Key '{key}' not found in algodata[self.algo].")
raise KeyError(f" '{key}' 未在 algodata[self.algo]")
def __setitem__(self, key, value):
if key == "ident":
raise AttributeError("ident should be readonly")
raise AttributeError("ident 应为只读")
self.algodata[self.algo][key] = value
self.algodata[self.algo]['last_modify'] = timer.get_timestamp()