Great! Thanks everyone for so many references and comments. Lots of
doubts have been solved.
On Fri, Jul 4, 2008 at 10:33 AM, Peter Otten <[EMAIL PROTECTED]> wrote:
> Ben Finney wrote:
>
>> Peter Otten <[EMAIL PROTECTED]> writes:
>>
>>> The problem is the structure of your program. The myset modul
Ben Finney wrote:
Peter Otten <[EMAIL PROTECTED]> writes:
The problem is the structure of your program. The myset module is
imported twice by Python, once as "myset" and once as "__main__".
Yes, this is the problem. Each module imports the other.
Therefore you get two distinct MySet class
Ben Finney wrote:
> Peter Otten <[EMAIL PROTECTED]> writes:
>
>> The problem is the structure of your program. The myset module is
>> imported twice by Python, once as "myset" and once as "__main__".
>
> Yes, this is the problem. Each module imports the other.
>
>> Therefore you get two distinc
Ben Finney wrote:
Peter Otten <[EMAIL PROTECTED]> writes:
The problem is the structure of your program. The myset module is
imported twice by Python, once as "myset" and once as "__main__".
Yes, this is the problem. Each module imports the other.
Therefore you get two distinct MySet classes
Peter Otten <[EMAIL PROTECTED]> writes:
> The problem is the structure of your program. The myset module is
> imported twice by Python, once as "myset" and once as "__main__".
Yes, this is the problem. Each module imports the other.
> Therefore you get two distinct MySet classes, and consequentl
Urizev wrote:
> Hi everyone
>
> I have developed the singleton implementation. However I have found a
> strange behaviour when using from different files. The code is
> attached.
>
> Executing main
> New singleton:
> <__main__.Singleton instance at 0x2b98be474a70>
> New singleton:
>
> I do n
On Jul 3, 6:58 pm, Urizev <[EMAIL PROTECTED]> wrote:
> Hi everyone
>
> I have developed the singleton implementation. However I have found a
> strange behaviour when using from different files. The code is
> attached.
>
> Executing main
> new MySet object
> No singleton instance
> New singleton:
>
Urizev wrote:
Hi everyone
I have developed the singleton implementation. However I have found a
strange behaviour when using from different files. The code is
attached.
Executing main
new MySet object
No singleton instance
New singleton:
<__main__.Singleton instance at 0x2b98be474a70>
new MySet
Hi everyone
I have developed the singleton implementation. However I have found a
strange behaviour when using from different files. The code is
attached.
Executing main
new MySet object
No singleton instance
New singleton:
<__main__.Singleton instance at 0x2b98be474a70>
new MySet object
There is