Singleton in Python Cookbook

John J. Lee jjl at pobox.com
Thu Jul 26 01:33:51 CEST 2007


Alex Popescu <nospam.themindstorm at gmail.com> writes:

> 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

Haven't looked at that recipe, but take a look at this related one:

http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/66531



John



More information about the Python-list mailing list