Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(182542)

#17301: An in-place version of many bytearray methods is needed

Can't Edit
Can't Publish+Mail
Start Review
Created:
6 years, 3 months ago by greg
Modified:
2 years, 6 months ago
Reviewers:
mmilkin
CC:
terry.reedy, gregory.p.smith, haypo, christian.heimes, ezio.melotti, inada.naoki, irdb, Martin Panter, storchaka, njl_njl.us
Visibility:
Public.

Patch Set 1 #

Total comments: 1

Patch Set 2 #

Unified diffs Side-by-side diffs Delta from patch set Stats Patch
Lib/test/test_bytes.py View 1 1 chunk +22 lines, -0 lines 0 comments Download
Objects/bytearrayobject.c View 1 2 chunks +96 lines, -0 lines 0 comments Download

Messages

Total messages: 1
mmilkin
6 years, 3 months ago #1
Had a thought when looking at the two functions

http://bugs.python.org/review/17301/diff/7864/Objects/bytearrayobject.c
File Objects/bytearrayobject.c (right):

http://bugs.python.org/review/17301/diff/7864/Objects/bytearrayobject.c#newco...
Objects/bytearrayobject.c:1438: if(!PyArg_UnpackTuple(args, "translate", 1, 2,
It looks like this function is 80% similar to the bytearray_translate,  Would it
be better to create a common function that both call?
Sign in to reply to this message.

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+