Menu

#3 Decorators missing

open
nobody
None
5
2010-01-17
2010-01-17
Anonymous
No

I have a decorator for making classes as singleton pattern:
def singleton(cls):
instances = {}
def getinstance():
if cls not in instances:
instances[cls] = cls()
return instances[cls]
return getinstance

but during synchronization ,app throws the exception .

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.