Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
e969b1b8
Commit
e969b1b8
authored
Oct 31, 2014
by
Serhiy Storchaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed compile error in issue #22410. The _locale module is optional.
parent
d4c72903
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
Lib/re.py
Lib/re.py
+6
-1
No files found.
Lib/re.py
View file @
e969b1b8
...
...
@@ -104,7 +104,10 @@ This module also defines an exception 'error'.
import
sys
import
sre_compile
import
sre_parse
import
_locale
try
:
import
_locale
except
ImportError
:
_locale
=
None
# public symbols
__all__
=
[
"match"
,
"search"
,
"sub"
,
"subn"
,
"split"
,
"findall"
,
...
...
@@ -250,6 +253,8 @@ def _compile(*key):
if
len
(
_cache
)
>=
_MAXCACHE
:
_cache
.
clear
()
if
p
.
flags
&
LOCALE
:
if
not
_locale
:
return
p
loc
=
_locale
.
setlocale
(
_locale
.
LC_CTYPE
)
else
:
loc
=
None
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment