A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2003-September/038225.html below:

[Python-Dev] Discussion on adding rsplit() for strings and unicode objects.

[Python-Dev] Discussion on adding rsplit() for strings and unicode objects.Alex Martelli aleaxit at yahoo.com
Tue Sep 23 03:46:18 EDT 2003
On Monday 22 September 2003 06:56 pm, Barry Scott wrote:
> >I'm all for it.  I've had to implement rsplit on my own as well, and
> > always lamented (but never did anything, unfortunately) about its lack in
> > the standard library.  That strings have rfind, rindex, rstrip, and
> > rjust, but not rsplit always seemed somewhat less than complete to me.
>
> These "r" are not a single family... some mean reverse some mean right.

???  They are: 

>>> [x for x in dir('') if x[:1]=='r']
['replace', 'rfind', 'rindex', 'rjust', 'rstrip']

'replace' is clearly distinct from the other (it's not an 'eplace' from the 
right:-).  All others can be read as "from the right" (reading them as
"reverse" is very obviously strained).  Find and Index the rightmost
occurrence, right-justify, strip characters from the right of the string.


Alex


More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4