Skip to content

bytes.rpartition bug in online documentation #80597

Closed

Description

@pewscorner
BPO 36416
Nosy @methane, @miss-islington, @tirkarthi, @pewscorner
PRs
  • bpo-36416: Correct bytes.rpartition documentation #12543
  • [3.7] bpo-36416: Correct bytes.rpartition documentation (GH-12543) #12781
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2019-04-11.10:20:02.831>
    created_at = <Date 2019-03-24.14:23:47.131>
    labels = ['easy', '3.8', 'type-bug', '3.7', 'docs']
    title = 'bytes.rpartition bug in online documentation'
    updated_at = <Date 2019-04-11.10:20:02.831>
    user = 'https://github.com/pewscorner'

    bugs.python.org fields:

    activity = <Date 2019-04-11.10:20:02.831>
    actor = 'methane'
    assignee = 'docs@python'
    closed = True
    closed_date = <Date 2019-04-11.10:20:02.831>
    closer = 'methane'
    components = ['Documentation']
    creation = <Date 2019-03-24.14:23:47.131>
    creator = 'pewscorner'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 36416
    keywords = ['patch', 'easy']
    message_count = 6.0
    messages = ['338734', '338735', '338747', '338750', '339929', '339954']
    nosy_count = 5.0
    nosy_names = ['methane', 'docs@python', 'miss-islington', 'xtreak', 'pewscorner']
    pr_nums = ['12543', '12781']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue36416'
    versions = ['Python 3.7', 'Python 3.8']

    Activity

    1. pewscorner commented on Mar 24, 2019

      pewscornermannequin
      MannequinAuthor

      The online Python 3 documentation for bytes.rpartition and bytearray.rpartition (https://docs.python.org/3/library/stdtypes.html#bytes.rpartition) incorrectly states:

      "If the separator is not found, return a 3-tuple containing a copy of the original sequence, followed by two empty bytes or bytearray objects."

      This seems to have been copied without modification from bytes.partition where the statement is correct. The statement for rpartition should be:

      "If the separator is not found, return a 3-tuple containing two empty bytes or bytearray objects, followed by a copy of the original sequence."

    2. added
      docs
      type-bug
      on Mar 24, 2019
    3. tirkarthi commented on Mar 24, 2019

      @tirkarthi
      Member

      Thanks for the report. Would you like to create a PR for this?

      The test for this behavior is at

      self.assertEqual(b.rpartition(b'w'), (b'', b'', b'mississippi'))

      Doc file to be changed : https://github.com/python/cpython/blob/master/Doc/library/stdtypes.rst

    4. pewscorner commented on Mar 24, 2019

      pewscornermannequin
      MannequinAuthor

      OK, I can give it a try. I need to read up on the procedures for doing so, first, though, so it may take a while.

    5. tirkarthi commented on Mar 24, 2019

      @tirkarthi
      Member
    6. methane commented on Apr 11, 2019

      @methane
      Member

      New changeset efc4870 by Inada Naoki (pewscorner) in branch 'master':
      bpo-36416: Correct bytes.rpartition documentation (GH-12543)
      efc4870

    7. miss-islington commented on Apr 11, 2019

      @miss-islington
      Contributor

      New changeset 04b114e by Miss Islington (bot) in branch '3.7':
      bpo-36416: Correct bytes.rpartition documentation (GH-12543)
      04b114e

    8. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      3.7 (EOL)3.8 (EOL)docseasytype-bug

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions