This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author gregory.p.smith
Recipients alexandre.vassalotti, gregory.p.smith
Date 2007-12-03.03:50:17
SpamBayes Score 1.30741e-05
Marked as misclassified No
Message-id <>
In-reply-to <>
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.


On 12/2/07, Alexandre Vassalotti <> wrote:
> Alexandre Vassalotti added the comment:
> Done. Is there any other issue with the patch?
> Added file:
> __________________________________
> Tracker <>
> <>
> __________________________________
Date User Action Args
2007-12-03 03:50:18gregory.p.smithsetspambayes_score: 1.30741e-05 -> 1.30741e-05
recipients: + gregory.p.smith, alexandre.vassalotti
2007-12-03 03:50:18gregory.p.smithlinkissue1283 messages
2007-12-03 03:50:17gregory.p.smithcreate