2006年09月20日 星期三 08:42
关于字符串新增的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
Zeuux © 2025
京ICP备05028076号