[issue20998] fullmatch isn't matching correctly under re.IGNORECASE
Matthew Barnett
report at bugs.python.org
Fri Apr 4 20:49:34 CEST 2014
Matthew Barnett added the comment:
> > - (!ctx->match_all || ctx->ptr == state->end)) {
> > + ctx->ptr == state->end) {
>
> Why this check is not needed anymore?
>
After stepping through the code for that regex that fails, I concluded
that the condition shouldn't depend on ctx->match_all at that point
after all.
> > - status = SRE(match)(state, pattern + 2*prefix_skip);
> > + status = SRE(match)(state, pattern + 2*prefix_skip,
> state->match_all);
>
> > - status = SRE(match)(state, pattern + 2);
> > + status = SRE(match)(state, pattern + 2, state->match_all);
>
> state->match_all is used but it is never initialized.
I thought I'd initialised it in all the places it's used.
I admit that I find the code a little hard to follow at times... :-(
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue20998>
_______________________________________
More information about the Python-bugs-list
mailing list