Movatterモバイル変換


[0]ホーム

URL:


[Python-Dev] Proof of the pudding: str.partition()

Josiah Carlsonjcarlson at uci.edu
Mon Aug 29 08:29:58 CEST 2005


"Raymond Hettinger" <raymond.hettinger at verizon.net> wrote:> As promised, here is a full set of real-world comparative code> transformations using str.partition().  The patch isn't intended to be> applied; rather, it is here to test/demonstrate whether the new> construct offers benefits under a variety of use cases.Having looked at many of Raymond's transformations earlier today (justemailing him a copy of my thoughts and changes minutes ago), I agreethat this simplifies essentially every example I have seen translated,and translated myself.There are a handful of errors I found during my pass, most of which seemcorrected in the version he has sent to python-dev (though not all). To those who are to reply in this thread, rather than nitpicking aboutthe correctness of individual transformations (though perhaps you shouldemail him directly about those), comment about how much better/worsethey look.Vote to add str.partition to 2.5: +1Vote to dump str.find sometime later if str.partition makes it: +1 - Josiah


More information about the Python-Devmailing list

[8]ページ先頭

©2009-2025 Movatter.jp