def singleton_particle(*bases):
"""Defines a singleton instance immediately when defining the class. The
name of the class will refer the instance instead.
"""
return with_metaclass(SingletonParticleMeta, SingletonParticle, *bases)
评论列表
文章目录