import inside or outside function
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/128478/should-python-import-statements-always-be-at-the-top-of-a-module">Should Python import statements always be at the top of a module?</a>  </p>
</blockquote>



<p>In a very simple one-file python program like</p>

<pre><code># ------------------------

# place 1
# import something

def foo():

   # place 2
   # import something
   return something.foo()

def bar(f):
    ...

def baz():
    f = foo()
    bar(f)

baz()

# ----------------
</code></pre>

<p>Would you put the "import something" at place 1 or 2?</p>
