mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
Convert all remaining *simple* cases of regex usage to re usage.
This commit is contained in:
parent
426916e50e
commit
9694fcab53
23 changed files with 134 additions and 144 deletions
|
@ -2,7 +2,7 @@
|
|||
|
||||
import os
|
||||
import fnmatch
|
||||
import regex
|
||||
import re
|
||||
|
||||
|
||||
def glob(pathname):
|
||||
|
@ -50,7 +50,7 @@ def glob1(dirname, pattern):
|
|||
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue