Gregory P. Smith added the comment: reading 5.patch over...
Any particular reason for using buf_size = 32 when the length isn't known up front? add a comment saying why (or that its just a magic guess). anyways it sounds like a fine starting value. picking anything "better" would require profiling. perhaps use a list comprehension instead of map() in the unit test? either works, its a style thing. (int(x) for x in orig*50) [int(x) for x in orig*50] also the uses of 5 and -5 in that test could be written using len(orig) instead of 5. add another assertRaises that tests to make sure a list with -1 in it raises a ValueError. While I dislike that this code makes a temporary copy of the data first, doing otherwise is more complicated so the simplicity of this one wins. Leave that optimization for later. Your code looks good. -gps On 12/2/07, Alexandre Vassalotti <[EMAIL PROTECTED]> wrote: > > Alexandre Vassalotti added the comment: > > Done. Is there any other issue with the patch? > > Added file: http://bugs.python.org/file8857/byte_extend-5.patch > > __________________________________ > Tracker <[EMAIL PROTECTED]> > <http://bugs.python.org/issue1283> > __________________________________ > __________________________________ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1283> __________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com