title: Syntax error using sys.argv as argument in function
body: <p>Got syntax error caused by this line of code</p>
  
  <pre><code>def load(sys.argv):
      with open(sys.argv[1]) as file:
          reader = json.load(file)
          return reader['json']
  
  </code></pre>
  
  <p>Message from stderr:</p>
  
  <pre><code>    def load(sys.argv):
                  ^
  SyntaxError: invalid syntax
  
  </code></pre>
  
  <p>Of course, I have imported sys.</p>
  
  <p>Actually, parameters inside the function, that use sys.argv, work properly. Does anyone know a solution to this?</p>