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 meador.inge
Recipients meador.inge, serhiy.storchaka
Date 2016-04-17.21:13:45
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1460927625.56.0.659976797932.issue26765@psf.upfronthosting.co.za>
In-reply-to
Content
If I follow this correctly, then it seems like there are two
main pieces to this patch:

  1. Consolidating the following methods into `bytes_methods.c`:

     a. {bytes, bytearray}_find_internal

     b. {bytes, bytearray}_find

     c. {bytes, bytearray}_count

     d. {bytes, bytearray}_index

     e. {bytes, bytearray}_rfind

     f. {bytes, bytearray}_rindex

     g. {bytes, bytearray}_contains

     h. (_bytes, _bytearray}_tailmatch

     i. {bytes, bytearray}_startswith

     j. {bytes, bytearray}_endswith

  2. Consolidating the redundant implementations of the following functions
     into the stringlib:

     a. return_self

     b. countchar

     c. replace_interleave

     d. replace_delete_single_character

     e. replace_delete_substring

     f. replace_single_character_in_place

     g. replace_substring_in_place

     h. replace_single_character

     i. replace_substring

     j. replace

If so, then that seems reasonable to me and a nice cleanup.

A few comments:

  1. The diffs are fairly large.  It might be easier to follow if you stage
     the two steps above as separate commits (if possible).

  2. Why are some of the namings in stringlib inconsistent?  For example,
     `stringlib_method_find` and `stringlib_index`.  In other words, why
     do some names have the *_method_* part?
History
Date User Action Args
2016-04-17 21:13:45meador.ingesetrecipients: + meador.inge, serhiy.storchaka
2016-04-17 21:13:45meador.ingesetmessageid: <1460927625.56.0.659976797932.issue26765@psf.upfronthosting.co.za>
2016-04-17 21:13:45meador.ingelinkissue26765 messages
2016-04-17 21:13:45meador.ingecreate