[Chicago] is there really no built-in file/iter split() thing?
ianb at colorstudy.com
Mon Dec 3 19:01:39 CET 2007
skip at pobox.com wrote:
> Skip> Patch here:
> Skip> http://bugs.python.org/issue1538
> David> And who says these micro-optimization threads don't lead to
> David> useful output?
> Note that this particular optimization (avoiding the copy when r?split
> matches nothing) is a very micro optimization itself. It may well get
> rejected as not worth the extra complexity.
Thanks for the patch. FWIW, I only noticed that str.replace didn't
create copies after seeing the results in a benchmark; I was testing
different ways of doing html quoting, and noticed that str.replace was
pretty fast when it didn't have to do any work. So in a small way these
things can be noticeable.
Ian Bicking : ianb at colorstudy.com : http://blog.ianbicking.org
More information about the Chicago