[Python-Dev] Remove str.find in 3.0?
Terry Reedy
tjreedy at udel.edu
Wed Aug 31 06:08:25 CEST 2005
"Delaney, Timothy (Tim)" <tdelaney at avaya.com> wrote in message
> before, sep, after = s.partition('?')
> ('http://www.python.org', '', '')
>
> before, sep, after = s.rpartition('?')
> ('', '', 'http://www.python.org')
I can also see this as left, sep, right, with the sep not found case
putting all in left or right depending on whether one scanned to the right
or left. In other words, when the scanner runs out of chars to scan,
everything is 'behind' the scan, where 'behind' depends on the direction of
scanning. That seems nicely symmetric.
Terry J. Reedy
More information about the Python-Dev
mailing list