[New-bugs-announce] [issue16240] Document a way to escape metacharacters in glob/fnmatch

Serhiy Storchaka report at bugs.python.org
Mon Oct 15 16:43:29 CEST 2012


New submission from Serhiy Storchaka:

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.

----------
assignee: docs at python
components: Documentation
files: fnmatch_doc_escape.patch
keywords: easy, patch
messages: 172976
nosy: docs at python, serhiy.storchaka
priority: high
severity: normal
status: open
title: Document a way to escape metacharacters in glob/fnmatch
type: behavior
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4
Added file: http://bugs.python.org/file27581/fnmatch_doc_escape.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16240>
_______________________________________


More information about the New-bugs-announce mailing list