Singleton in Python Cookbook

John J. Lee jjl at pobox.com
Wed Jul 25 19:33:51 EDT 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