This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

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 <>
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:52tim.peterssetrecipients: + tim.peters, gvanrossum, pitrou, serhiy.storchaka
2012-10-11 22:42:52tim.peterssetmessageid: <>
2012-10-11 22:42:52tim.peterslinkissue16203 messages
2012-10-11 22:42:52tim.peterscreate