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 belopolsky
Recipients belopolsky, josiahcarlson, larry, lskovlund, rhettinger
Date 2008-03-24.19:33:38
SpamBayes Score 0.23449494
Marked as misclassified No
Message-id <>
Attached patch (issue1569291.diff) reimplements the optimization by
following Objects/stringobject.c logic as Raymond suggested.

I see two remaining issues which in my view should be addressed separately:

1. There is no check for overflow after the multiplication computing the
size of the resulting array.  Note that while newarrayobject checks that
size*itemsize does not overflow internally, there is no such check for
Py_SIZE(a) * n. A decision needs to be made whether Overflow or NoMemory
error should be raised because currently string_repeat and
newarrayobject treat overflow differently.

2. See msg64429 above.  I think both string and (patched) array codes
can be simplified.
Date User Action Args
2008-03-24 19:33:40belopolskysetspambayes_score: 0.234495 -> 0.23449494
recipients: + belopolsky, rhettinger, josiahcarlson, larry, lskovlund
2008-03-24 19:33:40belopolskysetspambayes_score: 0.234495 -> 0.234495
messageid: <>
2008-03-24 19:33:39belopolskylinkissue1569291 messages
2008-03-24 19:33:38belopolskycreate