[issue5240] time.strptime fails to match data and format with Unicode whitespaces (Py3)
Hirokazu Yamamoto
report at bugs.python.org
Fri Feb 13 13:34:50 CET 2009
Hirokazu Yamamoto <ocean-city at m2.ccsnet.ne.jp> added the comment:
By quick observation, I found this problem goes away if following change
is applied.
Index: Lib/_strptime.py
===================================================================
--- Lib/_strptime.py (revision 69496)
+++ Lib/_strptime.py (working copy)
@@ -262,7 +262,7 @@
def compile(self, format):
"""Return a compiled re object for the format string."""
- return re_compile(self.pattern(format), IGNORECASE | ASCII)
+ return re_compile(self.pattern(format), IGNORECASE)
_cache_lock = _thread_allocate_lock()
# DO NOT modify _TimeRE_cache or _regex_cache without acquiring the
cache lock
But this is just an observation. I don't call this *fix* because I'm not
familier with unicode, this change might cause another problem if applied.
----------
dependencies: +re.IGNORECASE not Unicode-ready
nosy: +ocean-city
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5240>
_______________________________________
More information about the Python-bugs-list
mailing list