Closed mrichar1 closed 4 years ago
So if I'm reading it through right the logic (after this patch) is:
__init__
is called and sets self.reflags to re.IGNORECASE
default) or 0
(depending on ignorecase
).reflags
param is truthy (defaults to 0
) then self.reflags
is overwritten with this new value.Do you mean that if say ignorecase=True
AND reflags
is truthy then they should be combined, i.e. self.reflags |= reflags
Happy to update it to do this, or some other variation, as you see fit. Also happy to update the docs to explain whichever is settled on.
Yes of course, you are right. I somehow thought that ignore case had preference but I was confused :)
I think leaving the code as is (with a preference to reflags
) is fine. In fact, reflags
is never actually used anywhere: It is not read from the config file nor used from within alot as far as I can see. So we could even remove this parameter entirely.
OK, I'll update the docstrings to explain the ordering just now...
Fix for #1516