title: Confused about ** parameters in python function calls
body: <p>For reference I am referring to the answer in this <a href="https://stackoverflow.com/questions/2921847/python-once-and-for-all-what-does-the-star-operator-mean-in-python">post</a></p>
  
  <p>The author of the answer gives the following code</p>
  
  <pre><code>def sum(*values, **options):
      s = 0
      for i in values:
          s = s + i
      if "neg" in options:
          if neg:
              s = -s
      return s
  
  s = sum(1, 2, 3, 4, 5)            # returns 15
  s = sum(1, 2, 3, 4, 5, neg=True)  # returns -15
  s = sum(1, 2, 3, 4, 5, neg=False) # returns 15
  </code></pre>
  
  <p>However when I run on mine I get the following error</p>
  
  <pre><code>NameError: global name 'neg' is not defined
  </code></pre>
  
  <p>Can anyone explain this.  And in general, how does the function know when <code>values</code> ends and when <code>options</code> begins</p>