Common Python Mistakes
Regarding circular imports and #7:
The main problem in arises when using the <i>from mymodule import mysymbol</i> notion.<p>The example solved this by properly using <i>import mymodule</i>, although this might cause some more problem if your design is wrong, as see in the example. Calling <i>f()</i> from the module ("library") code itself is a very bad idea. Instead one should do this:<p>a.py:<p><pre><code>    import b

    def f():
        return b.x
</code></pre>
b.py:<p><pre><code>    import a

    x = 1

    def g():
        print a.f()
</code></pre>
main.py:<p><pre><code>    import a

    a.f()</code></pre>