diff options
author | Andrew M. Kuchling <amk@amk.ca> | 2006-09-05 13:11:33 +0000 |
---|---|---|
committer | Andrew M. Kuchling <amk@amk.ca> | 2006-09-05 13:11:33 +0000 |
commit | a8ed1b01a17fac91487e3ad6c66abae9347129fd (patch) | |
tree | 6e7451398c73424413a8d3f8b435e797c7306c45 | |
parent | 08f6f476d9be8a14b0f8ab8d827c417f5686f2e1 (diff) | |
download | cpython-git-a8ed1b01a17fac91487e3ad6c66abae9347129fd.tar.gz |
Rearrange example a bit, and show rpartition() when separator is not found
-rw-r--r-- | Doc/whatsnew/whatsnew25.tex | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Doc/whatsnew/whatsnew25.tex b/Doc/whatsnew/whatsnew25.tex index 4272ce3af6..e8a9ce6eea 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.) |