A RetroSearch Logo

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

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2006-September/068636.html below:

[Python-Dev] Fwd: Problem withthe API for str.rpartition()

[Python-Dev] Fwd: Problem withthe API for str.rpartition()Ron Adam rrr at ronadam.com
Tue Sep 5 20:44:40 CEST 2006
Ron Adam wrote:

Correcting myself...

> I hope this discussion is only about the words used and the 
> documentation and not about the actual order of what is received. I 
> would expect both the following should be true, and it is the current 
> behavior.
> 
>     ''.join(s.partition(sep)) -> s
>     ''.join(s.rpartition(sep)) -> s

>>> 'abcd'.partition('x')
('abcd', '', '')
>>> 'abcd'.rpartition('x')
('abcd', '', '')
>>>

Ok, I see Raymonds point, they are not what I expected.

Although the above is still true, the returned value for the not found condition
is inconsistent.

_Ron




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