original_docstring: Make a class a Singleton class (only one instance)
docstring: Make a class a Singleton class (only one instance)
docstring_tokens: Make a class a Singleton class ( only one instance )
code: def singleton(cls):
      """Make a class a Singleton class (only one instance)"""
      @functools.wraps(cls)
      def wrapper_singleton(*args, **kwargs):
          if not wrapper_singleton.instance:
              wrapper_singleton.instance = cls(*args, **kwargs)
          return wrapper_singleton.instance
      wrapper_singleton.instance = None
      return wrapper_singleton
code_tokens: def singleton ( cls ) : @ functools . wraps ( cls ) def wrapper_singleton ( * args , ** kwargs ) : if not wrapper_singleton . instance : wrapper_singleton . instance = cls ( * args , ** kwargs ) return wrapper_singleton . instance wrapper_singleton . instance = None return wrapper_singleton
short_docstring: Make a class a Singleton class (only one instance)
short_docstring_tokens: Make a class a Singleton class ( only one instance )
comment: """Make a class a Singleton class (only one instance)"""