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.
Created on 2014年09月15日 08:42 by serhiy.storchaka, last changed 2022年04月11日 14:58 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| re_pickle.patch | serhiy.storchaka, 2014年09月15日 09:22 | review | ||
| Messages (2) | |||
|---|---|---|---|
| msg226905 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2014年09月15日 08:42 | |
Compiled re._compile() is used to reconstruct compiled regular expression pattern. re._compile() is private function and can be removed in (long-term) future. I propose to use re.compile() instead. |
|||
| msg226928 - (view) | Author: Guido van Rossum (gvanrossum) * (Python committer) | Date: 2014年09月15日 17:25 | |
But who says this isn't intended? I don't know why it was done this way, but the following reasoning might apply: we want to have a stable API for unpickling compiled regexps, but we want to be able to evolve the re.compile() API. Just the fact that '_compile' starts with an underscore doesn't mean that it may involve -- in fact, the fact that it is used by pickles says the opposite. Therefore I think the patch makes things worse (tying the pickle format to the public re.compile() method). At best we should add a comment to _compile explaining that its API is constrained by pickle backward compatibility. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:58:08 | admin | set | github: 66606 |
| 2014年09月15日 17:25:14 | gvanrossum | set | status: open -> closed nosy: + gvanrossum messages: + msg226928 resolution: not a bug |
| 2014年09月15日 09:22:48 | serhiy.storchaka | set | files:
+ re_pickle.patch keywords: + patch stage: patch review |
| 2014年09月15日 08:42:37 | serhiy.storchaka | create | |