A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-checkins/2002-March/024785.html below:

[Python-checkins] CVS: python/dist/src/Doc/lib libre.tex,1.76,1.77

[Python-checkins] CVS: python/dist/src/Doc/lib libre.tex,1.76,1.77Fred L. Drake fdrake@users.sourceforge.net
Mon, 04 Mar 2002 20:02:41 -0800
Update of /cvsroot/python/python/dist/src/Doc/lib
In directory usw-pr-cvs1:/tmp/cvs-serv28790/lib

Modified Files:
	libre.tex 
Log Message:
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.


Index: libre.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libre.tex,v
retrieving revision 1.76
retrieving revision 1.77
diff -C2 -d -r1.76 -r1.77
*** libre.tex	4 Mar 2002 23:08:28 -0000	1.76
--- libre.tex	5 Mar 2002 04:02:39 -0000	1.77
***************
*** 858,873 ****
  
  \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
  \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.
--- 858,873 ----
  
  \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
  \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.




RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4