title: Import function from other file doesn't work
body: <p>My main.py contains:</p>
  <pre><code>import functions
  
  a=2
  b=3
  
  print(functions.function1(2))
  </code></pre>
  <p>My functions.py contains:</p>
  <pre><code>import main
  
  def function1(x):
      return x+main.a+main.b
      
  def function2(x):
      return x-main.a-main.b
  
  def function3(x):
      return x*main.a*main.b
  </code></pre>
  <p>When I run my main (which is in the same folder as functions.py), it returns me an error:</p>
  <pre><code>  File &quot;C:\...\main.py&quot;, line 6, in &lt;module&gt;
      print(functions.function1(2))
  
  AttributeError: module 'functions' has no attribute 'function1'
  </code></pre>
  <p>What am I doing wrong here ? I thought it is the way to import stuff ? I would like to fix it but also to understand precisely the issue.</p>
  <p>Note: I don't want to pass a and b as parameters of the other functions for the reason, see my related question <a href="https://stackoverflow.com/questions/63858699/python-function-in-separate-file-they-all-require-the-same-parameters-how-to-m?noredirect=1#comment112923620_63858699">Python function in separate file: they all require the same parameters. How to make global variable in multiple file?</a></p>