Created
September 9, 2021 15:03
-
-
Save idrisr/487f7d01b5887617bf8685ec1dd48265 to your computer and use it in GitHub Desktop.
Singleton Pattern
This file contains hidden or 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
>>> from traitlets.config.configurable import SingletonConfigurable | |
>>> class Foo(SingletonConfigurable): pass | |
>>> foo = Foo.instance() | |
>>> foo == Foo.instance() | |
True |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment