Quick fix for a new problem here -- using string.lowercase somehow caused

problems.
This commit is contained in:
Guido van Rossum 2007-08-11 16:40:13 +00:00
parent 0eaa940638
commit 9264ecd799
1 changed files with 3 additions and 4 deletions

View 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,