commit | 9694fcab5332f27dc28b195ba1391e5491d2eaef | [log] [tgz] |
---|---|---|
author | Guido van Rossum <guido@python.org> | Wed Oct 22 21:00:49 1997 +0000 |
committer | Guido van Rossum <guido@python.org> | Wed Oct 22 21:00:49 1997 +0000 |
tree | 23dc3d9a7d1cc4b138ac2bffd028a519cba93b30 | |
parent | 426916e50e1209d8ecc12678855dc531863a48c5 [diff] [blame] |
Convert all remaining *simple* cases of regex usage to re usage.
diff --git a/Lib/glob.py b/Lib/glob.py index 990ffa3..599d41b5 100644 --- a/Lib/glob.py +++ b/Lib/glob.py
@@ -2,7 +2,7 @@ import os import fnmatch -import regex +import re def glob(pathname): @@ -50,7 +50,7 @@ return result -magic_check = regex.compile('[*?[]') +magic_check = re.compile('[*?[]') def has_magic(s): - return magic_check.search(s) >= 0 + return magic_check.search(s) is not None