From c29e6d3a472f19bf8828eb829c0126e8c8fc8561 Mon Sep 17 00:00:00 2001 From: "andrew.kuchling" Date: Tue, 5 Sep 2006 13:11:33 +0000 Subject: [PATCH] Rearrange example a bit, and show rpartition() when separator is not found git-svn-id: http://svn.python.org/projects/python/branches/release25-maint@51743 6015fed2-1504-0410-9fe1-9d1591cc4771 --- Doc/whatsnew/whatsnew25.tex | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Doc/whatsnew/whatsnew25.tex b/Doc/whatsnew/whatsnew25.tex index 4272ce3af..e8a9ce6ee 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.) -- 2.11.4.GIT