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


The format of the signature of the function in Python docs is a bit confusing, compared to the open bracket in the python docs, what is the importance of putting it in the first place ? What is the significance of bracket nesting?

How are these:

  RegexObject.match (string [, pos [, endpoe]])  

One is expected:

  RegexObject.match (string, [pause], [endo]) RegexObject.match (string [, pos] [, endpoints])  

With your notation:

  write to RegexObject.match (string, [pause], [endpoint])  

Must be:

  r.match ("foo" ,,)  

Nesting is required because if you supply the third parameter, then you The second parameter should also be provided, although this is an optional parameter. The following non-nested options will be ambiguous:

  RegexObject.match (string [, pos] [, endpoints])  

Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -