[Python-Dev] Remove str.find in 3.0?

Hye-Shik Chang hyeshik at gmail.com
Tue Aug 30 20:24:40 CEST 2005


On 8/28/05, Raymond Hettinger <raymond.hettinger at verizon.net> wrote:
>     >>> s = 'http://www.python.org'
>     >>> partition(s, '://')
>     ('http', '://', 'www.python.org')
>     >>> partition(s, '?')
>     ('http://www.python.org', '', '')
>     >>> partition(s, 'http://')
>     ('', 'http://', 'www.python.org')
>     >>> partition(s, 'org')
>     ('http://www.python.', 'org', '')
> 

What would be a result for rpartition(s, '?') ?
('', '', 'http://www.python.org')
or
('http://www.python.org', '', '')

BTW, I wrote a somewhat preliminary patch for this functionality
to let you save little of your time. :-)

http://people.freebsd.org/~perky/partition-r1.diff


Hye-Shik


More information about the Python-Dev mailing list