summaryrefslogtreecommitdiffstats
path: root/Doc/lib
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2002-03-05 04:02:39 (GMT)
committerFred Drake <fdrake@acm.org>2002-03-05 04:02:39 (GMT)
commit9479c958c517a719f98b23f435604d0fc2f83fe2 (patch)
tree864548698125e2a511d65bbab249a41345f97088 /Doc/lib
parentdfd0b296d766645bd2e01955a61f52643a483922 (diff)
downloadcpython-9479c958c517a719f98b23f435604d0fc2f83fe2.zip
cpython-9479c958c517a719f98b23f435604d0fc2f83fe2.tar.gz
cpython-9479c958c517a719f98b23f435604d0fc2f83fe2.tar.bz2
Remove extra indenatation from sample interpreter session.
Remove whitespace from the middle of an inline RE example; it was OK for the typeset formats, but LaTeX2HTML is more touchy about this.
Diffstat (limited to 'Doc/lib')
-rw-r--r--Doc/lib/libre.tex22
1 files changed, 11 insertions, 11 deletions
diff --git a/Doc/lib/libre.tex b/Doc/lib/libre.tex
index ab51c10..ca829df 100644
--- a/Doc/lib/libre.tex
+++ b/Doc/lib/libre.tex
@@ -857,17 +857,17 @@ of backtracking, you may encounter a RuntimeError exception with the message
\code{maximum recursion limit exceeded}. For example,
\begin{verbatim}
- >>> s = "<" + "that's a very big string!"*1000 + ">"
- >>> re.match('<.*?>', s)
- Traceback (most recent call last):
- File "<stdin>", line 1, in ?
- File "/usr/local/lib/python2.3/sre.py", line 132, in match
- return _compile(pattern, flags).match(string)
- RuntimeError: maximum recursion limit exceeded
+>>> s = "<" + "that's a very big string!"*1000 + ">"
+>>> re.match('<.*?>', s)
+Traceback (most recent call last):
+ File "<stdin>", line 1, in ?
+ File "/usr/local/lib/python2.3/sre.py", line 132, in match
+ return _compile(pattern, flags).match(string)
+RuntimeError: maximum recursion limit exceeded
\end{verbatim}
You can often restructure your regular expression to avoid backtracking.
-The above regular expression can be recast as \regexp{\textless
-[\textasciicircum \textgreater]*\textgreater}. As a further
-benefit, such regular expressions will run faster than their backtracking
-equivalents.
+The above regular expression can be recast as
+\regexp{\textless[\textasciicircum \textgreater]*\textgreater}. As a
+further benefit, such regular expressions will run faster than their
+backtracking equivalents.