"Delaney, Timothy (Tim)" <[EMAIL PROTECTED]> 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




_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to