Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(48)

Unified Diff: Lib/_strptime.py

Issue 2439: py3k regular expressions and unicode (Closed) Base URL: http://svn.python.org/view/*checkout*/python/branches/py3k/
Patch Set: Final patch (hopefully) also adding the (?a) inline flag Created 15 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Lib/base64.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Lib/_strptime.py
===================================================================
--- Lib/_strptime.py (revision 65250)
+++ Lib/_strptime.py (working copy)
@@ -14,7 +14,7 @@
import locale
import calendar
from re import compile as re_compile
-from re import IGNORECASE
+from re import IGNORECASE, ASCII
from re import escape as re_escape
from datetime import date as datetime_date
try:
@@ -262,7 +262,7 @@
def compile(self, format):
"""Return a compiled re object for the format string."""
- return re_compile(self.pattern(format), IGNORECASE)
+ return re_compile(self.pattern(format), IGNORECASE | ASCII)
_cache_lock = _thread_allocate_lock()
# DO NOT modify _TimeRE_cache or _regex_cache without acquiring the cache lock
« no previous file with comments | « no previous file | Lib/base64.py » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b