summaryrefslogtreecommitdiffstats
path: root/Doc/whatsnew
diff options
context:
space:
mode:
authorAndrew M. Kuchling <amk@amk.ca>2006-09-05 13:02:40 (GMT)
committerAndrew M. Kuchling <amk@amk.ca>2006-09-05 13:02:40 (GMT)
commita60b60e72e1fa0a8a17c8e0857582a6fe1d2930e (patch)
tree3af084e24988d03d776eabc2249ead14cc4916a0 /Doc/whatsnew
parentc48c9e266f0cd11b4551e5ddc4cb3717f54a9201 (diff)
downloadcpython-a60b60e72e1fa0a8a17c8e0857582a6fe1d2930e.zip
cpython-a60b60e72e1fa0a8a17c8e0857582a6fe1d2930e.tar.gz
cpython-a60b60e72e1fa0a8a17c8e0857582a6fe1d2930e.tar.bz2
Rearrange example a bit, and show rpartition() when separator is not found
Diffstat (limited to 'Doc/whatsnew')
-rw-r--r--Doc/whatsnew/whatsnew25.tex6
1 files changed, 4 insertions, 2 deletions
diff --git a/Doc/whatsnew/whatsnew25.tex b/Doc/whatsnew/whatsnew25.tex
index 4272ce3..e8a9ce6 100644
--- a/Doc/whatsnew/whatsnew25.tex
+++ b/Doc/whatsnew/whatsnew25.tex
@@ -1115,12 +1115,14 @@ Some examples:
\begin{verbatim}
>>> ('http://www.python.org').partition('://')
('http', '://', 'www.python.org')
->>> (u'Subject: a quick question').partition(':')
-(u'Subject', u':', u' a quick question')
>>> ('file:/usr/share/doc/index.html').partition('://')
('file:/usr/share/doc/index.html', '', '')
+>>> (u'Subject: a quick question').partition(':')
+(u'Subject', u':', u' a quick question')
>>> 'www.python.org'.rpartition('.')
('www.python', '.', 'org')
+>>> 'www.python.org'.rpartition(':')
+('', '', 'www.python.org')
\end{verbatim}
(Implemented by Fredrik Lundh following a suggestion by Raymond Hettinger.)