Here is the string I have (as a string):
bytearray([source[, encoding[, errors]]])
Here is the data I want out of it:
arguments: [ { name: 'source', optional: true }, ... ]
Or put another way, I want the name of each argument and to know whether it is optional. The brackets denote whether it is optional.
I've made code to get just the arguments, and seen other examples for that, but not to get optional arguments.