]> granicus.if.org Git - python/commitdiff
Quick fix for a new problem here -- using string.lowercase somehow caused
authorGuido van Rossum <guido@python.org>
Sat, 11 Aug 2007 16:40:13 +0000 (16:40 +0000)
committerGuido van Rossum <guido@python.org>
Sat, 11 Aug 2007 16:40:13 +0000 (16:40 +0000)
problems.

Lib/textwrap.py

index 3afc269241f44915ea56fa91570efa5e12eadda9..3fc14f0c8c38a7c0c208a7ec7b5e1fe489b0ded5 100644 (file)
@@ -77,12 +77,11 @@ class TextWrapper:
         r'[^\s\w]*\w+[a-zA-Z]-(?=\w+[a-zA-Z])|'   # hyphenated words
         r'(?<=[\w\!\"\'\&\.\,\?])-{2,}(?=\w))')   # em-dash
 
-    # XXX this is not locale- or charset-aware -- string.lowercase
-    # is US-ASCII only (and therefore English-only)
-    sentence_end_re = re.compile(r'[%s]'              # lowercase letter
+    # XXX this is not locale-aware
+    sentence_end_re = re.compile(r'[a-z]'             # lowercase letter
                                  r'[\.\!\?]'          # sentence-ending punct.
                                  r'[\"\']?'           # optional end-of-quote
-                                 % string.lowercase)
+                                 )
 
 
     def __init__(self,