title: no additional indentation with if __name__ == "__main__":
body: <p>i know that it is good style to define a main() method for "script-style" python programs so it can optionally be included as a module later on.</p>
  
  <p>so let's assume this code (random snippet):</p>
  
  <pre><code>a = 5
  if a &gt; 0:
      print a
  </code></pre>
  
  <p>becomes</p>
  
  <pre><code>def main():
      a = 5
      if a &gt; 0:
          print a
  
  if __name__ == "__main__":
      main()
  </code></pre>
  
  <p>causing all my code to be indented one more level.
  i try to avoid unnecessary indentation/nesting in my code for maximum clarity, and thus i am wondering if something can be done here, like e.g.</p>
  
  <pre><code>if __name__ != "__main__":
      return # just leave this file
  
  a = 5
  if a &gt; 0:
      print a
  </code></pre>
  
  <p>but (of course) this triggers:</p>
  
  <pre><code>SyntaxError: 'return' outside function
  </code></pre>
  
  <p>is something like this possible? advisable? idiomatic?</p>