From: Andrew M. Kuchling Date: Tue, 5 Sep 2006 13:02:40 +0000 (+0000) Subject: Rearrange example a bit, and show rpartition() when separator is not found X-Git-Tag: v2.6a1~2700 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a60b60e72e1fa0a8a17c8e0857582a6fe1d2930e;p=thirdparty%2FPython%2Fcpython.git Rearrange example a bit, and show rpartition() when separator is not found --- diff --git a/Doc/whatsnew/whatsnew25.tex b/Doc/whatsnew/whatsnew25.tex index 4272ce3af60a..e8a9ce6eeab3 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.)