Re: Singleton in Python Cookbook

2007-07-26 Thread Alex Popescu
Steve Holden <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > Alex Popescu wrote: >> Alex Popescu <[EMAIL PROTECTED]> wrote in >> news:[EMAIL PROTECTED]: >> >>> "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote in >>> news:[EMAIL PROTECTED]: >>> > > [snip...] > > If, that is, "work" means "R

Re: Singleton in Python Cookbook

2007-07-26 Thread Bruno Desthuilliers
Alex Popescu a écrit : > Bruno Desthuilliers <[EMAIL PROTECTED]> wrote in > news:[EMAIL PROTECTED]: > >> Alex Popescu a écrit : > >> [snip...] >> >> >> 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. > > I've sent the original co

Re: Singleton in Python Cookbook

2007-07-26 Thread Alex Popescu
Bruno Desthuilliers <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > Alex Popescu a écrit : > > [snip...] > > > 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. I've sent the original code and 2 different variants a long tim

Re: Singleton in Python Cookbook

2007-07-26 Thread Bruno Desthuilliers
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

Re: Singleton in Python Cookbook

2007-07-25 Thread Steve Holden
Alex Popescu wrote: > Alex Popescu <[EMAIL PROTECTED]> wrote in > news:[EMAIL PROTECTED]: > >> "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote in >> news:[EMAIL PROTECTED]: >> >>> Alex Popescu schrieb: Hi all! I was reading through Python Cookbook the Singleton recipe. At this m

Re: Singleton in Python Cookbook

2007-07-25 Thread O.R.Senthil Kumaran
* Alex Popescu <[EMAIL PROTECTED]> [2007-07-25 21:30:14]: > TypeError: type.__new__(SingleSpam): SingleSpam is not a subtype of type That's hardly helpful. All I can think about is, SingleSpam is a class and you have to defined the Class in your program, or it could be something else also. > (I

Re: Singleton in Python Cookbook

2007-07-25 Thread John J. Lee
Alex Popescu <[EMAIL PROTECTED]> 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 look

Re: Singleton in Python Cookbook

2007-07-25 Thread John J. Lee
"Diez B. Roggisch" <[EMAIL PROTECTED]> writes: [...] > AFAIK the cookbook is completely found online at ASPN. So no sweat > publishing it here. [...] No: the book-form cookbook is edited, and has extra text. I believe the recipes are under a BSD-style license, though. John -- http://mail.pytho

Re: Singleton in Python Cookbook

2007-07-25 Thread Alex Popescu
Alex Popescu <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote in > news:[EMAIL PROTECTED]: > >> Alex Popescu schrieb: >>> Hi all! >>> >>> I was reading through Python Cookbook the Singleton recipe. At this >>> moment I am a bit puzzled as the

Re: Singleton in Python Cookbook

2007-07-25 Thread Alex Popescu
"Diez B. Roggisch" <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > Alex Popescu schrieb: >> 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.__n

Re: Singleton in Python Cookbook

2007-07-25 Thread Diez B. Roggisch
Alex Popescu schrieb: > 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 o