[Zope-Checkins] CVS: Zope2 - STletters.py:1.3
chrism@serenade.digicool.com
chrism@serenade.digicool.com
Mon, 25 Jun 2001 16:29:39 -0400
Update of /cvs-repository/Zope2/lib/python/StructuredText
In directory serenade:/home/chrism/BackTalk/lib/python/StructuredText
Modified Files:
STletters.py
Log Message:
Took out "lettpunc" and added some convenience aliases for ST regexes.
--- Updated File STletters.py in package Zope2 --
--- STletters.py 2001/05/03 16:27:02 1.2
+++ STletters.py 2001/06/25 20:29:39 1.3
@@ -1,5 +1,4 @@
import string
-
try:
del string
import locale
@@ -9,7 +8,16 @@
import string
-letters = string.letters
-punctuations = string.punctuation
+def punc_func(exclude):
+ punc = r''
+ for char in string.punctuation:
+ if char not in exclude:
+ punc = punc + r'\%s' % char
+ return punc
-lettpunc = letters + punctuations
+digits = string.digits
+letters = string.letters
+literal_punc = punc_func("'")
+strongem_punc = punc_func('*')
+under_punc = punc_func('_')
+phrase_delimiters = r'\s\.\,\?\/\!\&\(\)'