Example: https://docs.python.org/3/library/functions.html#func-bytearray
class bytearray([source[, encoding[, errors]]])
Normally I just figure this out through examples, but I want to learn why the format of optional parameters are written in this way. Specifically:
What should I interpret when an optional parameter is within a [] of another parameter? If [a[, b]], then what does that mean for b in relation to a? If both are independent of each other, except by order, then why is b enclosed in the bracket for a?
For second and other parameters, why is there a comma preceding it within the brackets? What makes it different between [a[, b]] and [a[b]] given whatever the relation between the two from the first question above?
How is this format advantageous or suitable in situations than the one below besides us not having to specify/write the parameter names?
class bytearray(source = default_value1, encoding = default_value2, errors = default_value3)