title: How can I set a default for star arguments?
body: <p>I have a function that accepts <code>*args</code>, but I would like to set a default tuple, in case none are provided. (This is not possible through <code>def f(*args=(1, 3, 5))</code>, which raises a <code>SyntaxError</code>.) What would be the best way to accomplish this? The intended functionality is shown below.</p>
  
  <pre><code>f()
  # I received 1, 2, 3!
  
  f(1)
  # I received 1!
  
  f(9, 3, 72)
  # I received 9, 3, 72!
  </code></pre>
  
  <p>The following function <code>g</code> will provide the correct functionality, but I would prefer <code>*args</code>.</p>
  
  <pre><code>def g(args=(1, 2, 3)):
      return "I received {}!".format(', '.join(str(arg) for arg in args))
  
  g()
  # I received 1, 2, 3!
  
  g((1,))
  # I received 1!
  
  g((9, 3, 72))
  # I received 9, 3, 72!
  </code></pre>