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
Because otherwise the correct syntax would be to include the comma even if you are ignoring the arguments. The parts inside the square brackets are optional, so by moving the commas out of the square brackets, they are no longer optional. For example, to call the function below with only a string:
RegexObject.match(string, [pos], [endpos])
I would have to do:
RegexObject.match("foobar",,)
But, that isn't very elegant.