Reputation: 96
I saw this in the Python standard library documentation:
class bytearray([source[, encoding[, errors]]])
I don't understand the difference between ([source[, encoding[, errors]]])
and
(source, encoding, errors)
. Why do they put [, ]
around parameters?
Upvotes: 2
Views: 598