Message172704
Antoine, that's certainly the conceptual intent here. Can't say whether your attempt works in all cases. The docs don't guarantee it. For example, if the original regexp started with (?x), the docs explicitly say the effect of (?x) is undefined "if there are non-whitespace characters before the [inline (?x)] flag".
Sure, you could parse the regexp is user code too, and move an initial (?...x...) before your non-capturing group. For that matter, you could write your own regexp engine in user code too ;-)
The point is that it should be easy for the regexp engine to implement the desired functionality - and user attempts to "fake it" have pitfalls (even Guido didn't get it right - LOL ;-) ). |
|
Date |
User |
Action |
Args |
2012-10-11 22:42:52 | tim.peters | set | recipients:
+ tim.peters, gvanrossum, pitrou, serhiy.storchaka |
2012-10-11 22:42:52 | tim.peters | set | messageid: <1349995372.46.0.706619963015.issue16203@psf.upfronthosting.co.za> |
2012-10-11 22:42:52 | tim.peters | link | issue16203 messages |
2012-10-11 22:42:52 | tim.peters | create | |
|