Why do Python function docs include the comma after the bracket for optional args?

后端 未结 5 1604
灰色年华
灰色年华 2020-12-03 04:08

The format of the function signatures in the Python docs is a bit confusing. What is the significance in putting the comma after the open bracket, rather than before? What

5条回答
  •  旧巷少年郎
    2020-12-03 04:48

    If you think about the brackets enclosing all optional components of the argument list, it makes more sense. Essentially, anything inside brackets may be left out at the discretion of the user.

提交回复
热议问题