Movatterモバイル変換
[0]ホーム
[Python-Dev] Proof of the pudding: str.partition()
Charles Cazabonpython at discworld.dyndns.org
Wed Aug 31 16:30:46 CEST 2005
Michael Chermside <mcherm at mcherm.com> wrote:>> (*) An rpartition() function that searches from the right>> ...except that I understand why he included it and am convinced> by the arguments (use cases can be demonstrated and people would> expect it to be there and complain if it weren't).I would think that perhaps an optional second argument to the method thatcontrols whether it searches from the start (default) or end of the stringmight be nicer than having two separate methods, even though that would loseparallelism with the current .find/.index.While I'm at it, why not propose that for py3k that.rfind/.rindex/.rjust/.rsplit disappear, and .find/.index/.just/.split grow anoptional "fromright" (or equivalent) optional keyword argument?Charles-- -----------------------------------------------------------------------Charles Cazabon <python at discworld.dyndns.org>GPL'ed software available at:http://pyropus.ca/software/-----------------------------------------------------------------------
More information about the Python-Devmailing list
[8]ページ先頭