Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
42e5c5e1
Commit
42e5c5e1
authored
Sep 05, 2006
by
Andrew M. Kuchling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rearrange example a bit, and show rpartition() when separator is not found
parent
1b805ac2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
Doc/whatsnew/whatsnew25.tex
Doc/whatsnew/whatsnew25.tex
+4
-2
No files found.
Doc/whatsnew/whatsnew25.tex
View file @
42e5c5e1
...
...
@@ -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.)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment