Created
September 18, 2015 05:59
-
-
Save rystsov/1517327d88eb3576ef94 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def cas_update(old, new): | |
def change(x): | |
if x!=old: raise Conflict(x) | |
return new | |
return change |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment