title: Best practice: handle functions with lots of parameters and reserved names
body: <p>i am working on a <a href="https://github.com/20tab/uwsgiit-client" rel="nofollow">python client for the api</a> of uwsgi.it and i found the necessity to write methods that accept lots of (optional) parameters that will be sent via http requests.</p>
  
  <p>Initially i wanted to declare which parameters the user can insert, since they are so many i thought it was easier, and safer, for the user to have a list as parameters instead of leave him free to insert anything inside a dict and i ended up with something like this:</p>
  
  <pre><code>def alarms(self, container=None, _class=None, color=None,
             vassal=None, level=None, line=None, filename=None, 
             func=None, with_total=None, range=None):
      params = {k: v for k, v in locals().iteritems() if k != 'self' and v}
      if '_class' in params:
          params['class'] = params['_class']
          del params['_class']
      return self.get('alarms', params)
  </code></pre>
  
  <p>But it is pretty ugly and i really don't like this way to handle '_class' parameter. So the other possibility that comes to my mind is to accept a dictionary that can contain anything (or **kwargs), list the accepted keys in the docstring and then to sanitize the input. A possible way would be to declare a "private" method that accept only the allowed params. But then the same problems appears again! Any suggestion? Any best-practice for methods with so many parameters?</p>