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 2012年10月15日 14:43 by serhiy.storchaka, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| fnmatch_doc_escape.patch | serhiy.storchaka, 2012年10月15日 14:43 | review | ||
| Messages (9) | |||
|---|---|---|---|
| msg172976 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2012年10月15日 14:43 | |
fnmatch.translate's docstraing says "There is no way to quote meta-characters.", but this is wrong. One can remove the special meaning of ``'?'``, ``'*'`` and ``'['`` by wrapping them between square brackets. Thus, ``'[?]'`` matches the literal character ``'?'``. There are a lot of related issues: issue8402, issue13929, issue9358, issue738389, issue738361, issue1580472, issue5852. |
|||
| msg173771 - (view) | Author: Ezio Melotti (ezio.melotti) * (Python committer) | Date: 2012年10月25日 17:25 | |
I would use "It is possible to remove" rather than "One can remove", but otherwise the patch LGTM. |
|||
| msg173775 - (view) | Author: Fred Drake (fdrake) (Python committer) | Date: 2012年10月25日 17:40 | |
Better (IMO): Wrap the meta-characters in brackets for a literal match. For example, ``'[?]'`` matches the character ``'?'``. |
|||
| msg173779 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2012年10月25日 17:51 | |
My patch was only example. Commit what you feel is better. |
|||
| msg173780 - (view) | Author: Ezio Melotti (ezio.melotti) * (Python committer) | Date: 2012年10月25日 17:55 | |
For a literal match, wrap the meta-characters in brackets. For example, ``'[?]'`` matches the character ``'?'``. Stating the goal at the beginning of the sentence will make this easier to find while skimming through the doc. |
|||
| msg175287 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2012年11月10日 16:41 | |
Ezio, feel free to finalize this. For me all variants look good. |
|||
| msg175755 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2012年11月17日 15:39 | |
New changeset 333fe4c4897a by Ezio Melotti in branch '2.7': #16420: document a way to escape metacharacters in glob/fnmatch. http://hg.python.org/cpython/rev/333fe4c4897a New changeset 168f36c2b5ea by Ezio Melotti in branch '3.2': #16420: document a way to escape metacharacters in glob/fnmatch. http://hg.python.org/cpython/rev/168f36c2b5ea New changeset 2208061d863c by Ezio Melotti in branch '3.3': #16420: merge with 3.2. http://hg.python.org/cpython/rev/2208061d863c New changeset ff6d3fd9d08f by Ezio Melotti in branch 'default': #16420: merge with 3.3. http://hg.python.org/cpython/rev/ff6d3fd9d08f |
|||
| msg175758 - (view) | Author: Ezio Melotti (ezio.melotti) * (Python committer) | Date: 2012年11月17日 15:53 | |
Finalized! |
|||
| msg175763 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2012年11月17日 16:05 | |
Thank you, Ezio. Can we now continue with issue8402? |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:37 | admin | set | github: 60444 |
| 2012年11月17日 16:05:56 | serhiy.storchaka | set | messages: + msg175763 |
| 2012年11月17日 15:53:09 | ezio.melotti | set | status: open -> closed priority: high -> normal messages: + msg175758 assignee: docs@python -> ezio.melotti resolution: fixed stage: needs patch -> resolved |
| 2012年11月17日 15:50:21 | ezio.melotti | set | nosy:
+ python-dev messages: + msg175755 |
| 2012年11月10日 16:41:40 | serhiy.storchaka | set | keywords:
- patch messages: + msg175287 stage: patch review -> needs patch |
| 2012年10月25日 17:55:24 | ezio.melotti | set | messages: + msg173780 |
| 2012年10月25日 17:51:37 | serhiy.storchaka | set | messages: + msg173779 |
| 2012年10月25日 17:40:13 | fdrake | set | nosy:
+ fdrake messages: + msg173775 |
| 2012年10月25日 17:25:10 | ezio.melotti | set | nosy:
+ terry.reedy, ezio.melotti, eric.araujo messages: + msg173771 stage: needs patch -> patch review |
| 2012年10月24日 09:23:08 | serhiy.storchaka | set | type: behavior -> enhancement stage: needs patch |
| 2012年10月15日 14:43:29 | serhiy.storchaka | create | |