[Python-Dev] Proof of the pudding: str.partition()
jcarlson 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 (just
emailing him a copy of my thoughts and changes minutes ago), I agree
that 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 seem
corrected in the version he has sent to python-dev (though not all).
To those who are to reply in this thread, rather than nitpicking about
the correctness of individual transformations (though perhaps you should
email him directly about those), comment about how much better/worse
Vote to add str.partition to 2.5: +1
Vote to dump str.find sometime later if str.partition makes it: +1
More information about the Python-Dev