Python论坛  - 讨论区

标题:[python-chinese] Fwd: new string method in 2.5 (partition)

2006年09月20日 星期三 08:42

limodou limodou在gmail.com
星期三 九月 20 08:42:46 HKT 2006

关于字符串新增的partition的讨论

---------- Forwarded message ----------
From: Terry Reedy <tjreedy在udel.edu>
Date: Sep 20, 2006 7:42 AM
Subject: Re: new string method in 2.5 (partition)
To: python-list在python.org



"Bruno Desthuilliers" <bdesth.quelquechose在free.quelquepart.fr> wrote in
message news:4510425e$0$12250$636a55ce在news.free.fr...
>Err... is it me being dumb, or is it a perfect use case for str.split ?

s.partition() was invented and its design settled on as a result of looking
at some awkward constructions in the standard library and other actual use
cases.  Sometimes it replaces s.find or s.index instead of s.split.  In
some cases, it is meant to be used within a loop.  I was not involved and
so would refer you to the pydev discussions.

tjr





--
http://mail.python.org/mailman/listinfo/python-list


-- 
I like python!
My Blog: http://www.donews.net/limodou
UliPad Site: http://wiki.woodpecker.org.cn/moin/UliPad
UliPad Maillist: http://groups.google.com/group/ulipad

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

如下红色区域有误,请重新填写。

    你的回复:

    请 登录 后回复。还没有在Zeuux哲思注册吗?现在 注册 !

    Zeuux © 2025

    京ICP备05028076号