Borg pattern problem when used in two different modules
<p>I am using the Borg pattern with mutual inclusion of modules. See the example code (not the real code but it shows the problem) below. In this case, I have two different Borgs because the class names (and I guess the class) are seen as different by the interpreter. </p>

<p>Is there a way to use the Borg in that case without reworking the module architecture?</p>

<p>Module borg.py</p>

<pre>
import borg2

class Borg:
    _we_are_one = {}

    def __init__(self):
        self.__dict__ = Borg._we_are_one
        try:
            self.name
        except AttributeError:
            self.name = "?"
        print self.__class__, id(self.__dict__)

def fct_ab():
    a = Borg()
    a.name = "Bjorn"

    b = Borg()
    print b.name

if __name__ == "__main__":
    fct_ab()
    borg2.fct_c()
</pre>

<p>Module borg2.py</p>

<pre>
import borg

def  fct_c():
    c = borg.Borg()
    print c.name
</pre>

<p>The result is</p>

<pre>
__main__.Borg 40106720
__main__.Borg 40106720
Bjorn
borg.Borg 40106288
?
</pre>

<p>EDIT:
In order to clarify my problem:
Why does Python consider <code>__main__.Borg</code> and borg.Borg has two different classes?</p>
