Singleton in Python Cookbook

Bruno Desthuilliers bdesth.quelquechose at free.quelquepart.fr
Sun Jul 22 03:01:21 EDT 2007


Alex Popescu a écrit :
> Hi all!
> 
> I was reading through Python Cookbook the Singleton recipe. At this moment 
> I am a bit puzzled as the example in the book is not working resulting in:
> 
> TypeError: type.__new__(SingleSpam): SingleSpam is not a subtype of type
> 
> (I haven't presented the original code as I am not sure about copyrights).

I don't have the book, so if you don't post the code, I just give up 
trying to guess what the problem can be.



More information about the Python-list mailing list