Message416563
> Is the "import _locale" still used in re/__init__.py? It cannot see any reference to it in the code and test_re still if it's removed.
It is true.
> *Maybe* it's time to consider that re.template() and re.Scanner are no longer experimental? Maybe change their status to alpha or beta? :-D
First we need to find original discussions for these features (it may be not easy) and decide whether we want to finish them or remove.
> In `Modules` folder, there are _sre.c/sre.h/sre_constants.h/sre_lib.h files. Will them be put into a folder?
It is step 2.
> would it be possible to expose `parse_template` -- or at least some way to validate that a regex replacement string is correct prior to executing the replacement?
Maybe, in some form. Currently you can precompile a pattern, but for a replacement string you rely on a LRU cache. It is slower, and limited by the fixed size of the cache. I think it would be worth to add a function for compiling a replacement string. sub() etc should accept both string and a precompiled template object. It is a separate issue. |
|
Date |
User |
Action |
Args |
2022-04-02 16:05:08 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, gvanrossum, vstinner, ezio.melotti, mrabarnett, malin, Anthony Sottile, dom1310df |
2022-04-02 16:05:08 | serhiy.storchaka | set | messageid: <1648915508.48.0.0999349816799.issue47152@roundup.psfhosted.org> |
2022-04-02 16:05:08 | serhiy.storchaka | link | issue47152 messages |
2022-04-02 16:05:08 | serhiy.storchaka | create | |
|