title: Is it correct to pass None to a parameter?
body: <p>I am trying to understand if it is a good idea or not to pass as parameter the python equivalent of null; which I believe is None.</p>
  
  <p>Example: You have a function that accepts n parameters; in one case I need just the first and second parameters, so instead of writing a long function definition with args and kwargs, and manipulate them, I can just pass null to one of the parameters.</p>
  
  <pre><code>def myfunct(a, b, c[optional], d[optional], e, f....n):
      [do something]
      if d=="y":
          [do something but use only a and b]
  </code></pre>
  
  <p>Execution:</p>
  
  <pre><code>myfunct(a, b, c, d, .....n)                #OK!
  myfunct(a, b, None, "y", None,....n)       #OK?
  </code></pre>
  
  <p>This theoretically should not raise an error, since null is a value I believe (this is not C++), although I am not sure if this is a correct way to do things.
  The function knows that there is a condition when one of the parameters is a specific value, and in that case, it won't ask for any other parameter but 1; so the risk of using null should be practically 0.</p>
  
  <p>Is this acceptable or am I potentially causing issues down the road, using this approach?</p>