Skip to content

Instantly share code, notes, and snippets.

@yhaskell
Created March 2, 2017 20:41
Show Gist options
  • Save yhaskell/a2b65000c970284aa4744bb13000921e to your computer and use it in GitHub Desktop.
Save yhaskell/a2b65000c970284aa4744bb13000921e to your computer and use it in GitHub Desktop.
class Locker:
__value = None
def set(self, value):
self.__value = value
def get(self):
return self.__value
locker = Locker()
locker.set(42)
print (locker.get())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment