Message143442
I'd agree with Steven ( msg143377 ) and others, that there probably shouldn't be a large library-specific set of new tags just for "housekeeping" purposes between re and regex. I would personally prefer, that these tags also be settable in the pattern (?...), which would probably be problematic with versioned flags.
Although I am trying to take advantage of the new additions, if applicable, I agree, that there should be a possibility to use regex in an unreflected way with the same behaviour like re (maybe except for the fixes of what will be agreed on to be a bug (enough)).
On the other hand, it seems to me, that the enhancements/additions can be enabled at once, as an user upgrading the regexes for the new library consciously (or a new user not knowing re) can be supposed to know the new features and their implications. I guess, it is mostly trivially possible to fix/disambiguate the problematic patterns, e.g. by escaping.
As for setting the new/old behaviour, would there be a possibility to distinguish it just by importing (possibly through some magic, without the need to duplicate the code?),
import re_in_compat_mode as re
vs:
import re_with_all_the_new_features as re
Unfortunately, i have no idea, whether this is possible or viable...
with this option, the (user) code update could be just the change of the imports instead of adding the flags to all relevant places (and to take them away as redundant, as the defaults evolve with the versions...).
However, it is not clear, how this "aliasing" would work out with regard to the transition, maybe the long differenciated "module" names could be kept and the meaning of "import re" would change, allong with the previous warnings, in some future version.
just a few thoughts...
vbr |
|
Date |
User |
Action |
Args |
2011-09-02 22:39:51 | vbr | set | recipients:
+ vbr, loewis, georg.brandl, gregory.p.smith, jimjjewett, sjmachin, amaury.forgeotdarc, belopolsky, pitrou, nneonneo, giampaolo.rodola, rsc, timehorse, mark, ezio.melotti, mrabarnett, jaylogan, akitada, moreati, steven.daprano, alex, r.david.murray, jacques, zdwiel, jhalcrow, stiv, davide.rizzo, ronnix, eric.snow, akoumjian |
2011-09-02 22:39:51 | vbr | set | messageid: <1315003191.36.0.590348799185.issue2636@psf.upfronthosting.co.za> |
2011-09-02 22:39:50 | vbr | link | issue2636 messages |
2011-09-02 22:39:50 | vbr | create | |
|