Author tim.peters
Recipients gvanrossum, pitrou, serhiy.storchaka, tim.peters
Date 2012-10-11.22:42:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1349995372.46.0.706619963015.issue16203@psf.upfronthosting.co.za>
In-reply-to
Content
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 ;-) ).
History
Date User Action Args
2012-10-11 22:42:52tim.peterssetrecipients: + tim.peters, gvanrossum, pitrou, serhiy.storchaka
2012-10-11 22:42:52tim.peterssetmessageid: <1349995372.46.0.706619963015.issue16203@psf.upfronthosting.co.za>
2012-10-11 22:42:52tim.peterslinkissue16203 messages
2012-10-11 22:42:52tim.peterscreate