Skip to content

Instantly share code, notes, and snippets.

@vi4m
Last active August 29, 2015 14:16
Show Gist options
  • Save vi4m/ab296d0edfa641ebb10c to your computer and use it in GitHub Desktop.
Save vi4m/ab296d0edfa641ebb10c to your computer and use it in GitHub Desktop.
exam-2

Write simple Singleton.

Write Singleton which returns the same object every time. You can use the implementation you want.

first_object = Singleton(name='test1')
second_object = Singleton(name='test2')
print(first_object.name == second_object.name)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment