Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A lot of the api in core.mli has barely any documentation, and the behavior is not obvious at all. Or sometimes, the behavior is the expected one, but since it's not documented, you end up having to test it to make sure. So this is trying to address that.
The first commit adds
Re.Group.get_opt
because it sounds like a straightforward omission, and I wanted it for an example in the documentation. The second commit is pure documentation. I think the documentation I wrote is correct, and I tested some of it, but I am not 100% sure.I wanted to add something about marks, but I didn't, because I don't see the point of using them over using an empty group (performance maybe? or is just simpler api? or do they simply because they are used internally so it's easy to provide?).