> Just to put my spoke in the wheel, I find the difference in the
> ordering of return values for partition() and rpartition() confusing:
> 
> head, sep, remainder = partition(s)
> remainder, sep, head = rpartition(s)
> 
> My first expectation for rpartition() was that it would return exactly
> the same values as partition(), but just work from the end of the
> string.
> 
> IOW, I expected "www.python.org".partition("python") to return exactly
> the same as "www.python.org".rpartition("python")

Yow. Me too, and indeed I've been skimming this thread without
it ever occurring to me that it would be otherwise.

> Anyway, I'm definitely +1 on partition(), but -1 on rpartition()
> returning in "reverse order".

+1.

-- 
g

_______________________________________________
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