Matching a Junction makes Match immutable
The side issue of whether the match should return False
or True
is settled, I think, in the comment by @raiph.
On the other hand, the main problem of receiving the immutable Match
error was, it seems, a bug, with a commit that at least on my system fixes it.
So the problem was (as per the commit message) that regex match objects were not expected to be junctions.