Skip to content

Commit

Permalink
DEV: fix code example (#1016)
Browse files Browse the repository at this point in the history
  • Loading branch information
dwdougherty authored Jan 3, 2025
1 parent 4d3426a commit 048c021
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def compare_and_swap(x):
gb = GearsBuilder()
gb.map(age) # Extract the 'age' field from each hash
gb.foreach(compare_and_swap) # Compare the max age to the value stored at age:maximum
gb.register('person:*') # Only process keys matching the pattern 'person:*'
gb.register(prefix='person:*') # Only process keys matching the pattern 'person:*'
```

You can see here that we define two methods: `age()` and `compare_and_swap()`. Even if you're not familiar with Python, you should be able to see what the methods do.
Expand Down

0 comments on commit 048c021

Please sign in to comment.