So, we have five options:
- Match all raw strings unambiguously as regular expressions. We
will sometimes have false-positives.
- Match raw strings that are arguments to methods from the re
module. We will sometimes not match raw strings that are regular expressions, but can be pretty well guaranteed to never have a false-positive.
- Require some prefix to a raw string to "turn on" regular
expression matching. This has an extremely high probability of removing false-positives and false-negatives, but at the cost of additional CRUFT.
- A combination of 2. and 3. Match raw strings that are
arguments to re.compile and raw strings prefixed with (?#) as regular expressions, but no others.
- Don't match re's at all.
It would seem there is no perfect option. I propose that we put it to a vote, and perhaps appeal to our BDFL Allan.
I think option number 4 comes pretty darn close to perfect.
I'm voting for number 4, as well. Just out of curiosity, who's maintaining the Python bundle these days?
E