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.307408e-05
Marked as misclassified No
Message-id <52dc1c820712021950t59646ab3l87b04473b51fb946@mail.gmail.com>
In-reply-to <1196651918.45.0.602938785169.issue1283@psf.upfronthosting.co.za>
Content
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 <report@bugs.python.org> 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 <report@bugs.python.org>
> <http://bugs.python.org/issue1283>
> __________________________________
>
History
Date User Action Args
2007-12-03 03:50:18gregory.p.smithsetspambayes_score: 1.30741e-05 -> 1.307408e-05
recipients: + gregory.p.smith, alexandre.vassalotti
2007-12-03 03:50:18gregory.p.smithlinkissue1283 messages
2007-12-03 03:50:17gregory.p.smithcreate