We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The original code sample from
ethereum-org-website/public/content/developers/docs/data-structures-and-encoding/patricia-merkle-trie/index.md
Lines 37 to 48 in e7041d3
def update(node,path,value): if path == '': curnode = db.get(node) if node else [ NULL ] * 17 newnode = curnode.copy() newnode[-1] = value else: curnode = db.get(node) if node else [ NULL ] * 17 newnode = curnode.copy() newindex = update(curnode[path[0]],path[1:],value) newnode[path[0]] = newindex db.put(hash(newnode),newnode) return hash(newnode)
Shall we streamline the code a little bit with reducing the repeating part, like:
def update(node,path,value): curnode = db.get(node) if node else [ NULL ] * 17 newnode = curnode.copy() if path == '': newnode[-1] = value else: newindex = update(curnode[path[0]],path[1:],value) newnode[path[0]] = newindex db.put(hash(newnode),newnode) return hash(newnode)
The text was updated successfully, but these errors were encountered:
Closed by #12721
Sorry, something went wrong.
croath
No branches or pull requests
The original code sample from
ethereum-org-website/public/content/developers/docs/data-structures-and-encoding/patricia-merkle-trie/index.md
Lines 37 to 48 in e7041d3
Shall we streamline the code a little bit with reducing the repeating part, like:
The text was updated successfully, but these errors were encountered: