]> granicus.if.org Git - python/commitdiff
Rearrange example a bit, and show rpartition() when separator is not found
authorAndrew M. Kuchling <amk@amk.ca>
Tue, 5 Sep 2006 13:11:33 +0000 (13:11 +0000)
committerAndrew M. Kuchling <amk@amk.ca>
Tue, 5 Sep 2006 13:11:33 +0000 (13:11 +0000)
Doc/whatsnew/whatsnew25.tex

index 4272ce3af60af075929d971aaca9213fd3cecc40..e8a9ce6eeab3f3d6507303a0e8964bd6b95aaea9 100644 (file)
@@ -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.)