title: python how to define function with optional parameters by square brackets?
body: <p>I often find some functions defined like <code>open(name[, mode[, buffering]])</code> and I know it means optional parameters.<br>
  Python document says it's module-level function. When I try to define a function with this style, it always failed.<br>
  For example<br>
  <code>def f([a[,b]]): print('123')</code><br>
  does not work.<br>
  Can someone tell me what the module-level means and how can I define a function with this style? </p>