)]}'
{
  "commit": "cc5cf14ae0a3665ba9d192cc4152c0a46a9dab2f",
  "tree": "6cb9b665f8caabc9e6a1f823d1eef39cb769dbcd",
  "parents": [
    "4e97ff3351f381a61b238bd8e805e4e8dd3ea5cf"
  ],
  "author": {
    "name": "Cody Maloney",
    "email": "cmaloney@users.noreply.github.com",
    "time": "Sat May 09 21:39:01 2026"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Sat May 09 21:39:01 2026"
  },
  "message": "gh-139871: Fix 3.15 bytearray.take_bytes example (#149520)\n\nCurrently:\n```python\nbuffer \u003d bytearray(b\u0027abc\\ndef\u0027)\nn \u003d buffer.find(b\u0027\\n\u0027)\ndata \u003d bytes(buffer[:n + 1])\ndel buffer[:n + 1]\nassert data \u003d\u003d b\u0027abc\u0027\nTraceback (most recent call last):\n  File \"\u003cstdin\u003e\", line 1, in \u003cmodule\u003e\n    assert data \u003d\u003d b\u0027abc\u0027\n           ^^^^^^^^^^^^^^\nAssertionError\n```\n\nAdding in the `\\n` makes the two match:\n\n```python\nbuffer \u003d bytearray(b\u0027abc\\ndef\u0027)\nn \u003d buffer.find(b\u0027\\n\u0027)\ndata \u003d bytes(buffer[:n + 1])\ndel buffer[:n + 1]\nassert data \u003d\u003d b\u0027abc\\n\u0027\nassert buffer \u003d\u003d bytearray(b\u0027def\u0027)\n\nbuffer \u003d bytearray(b\u0027abc\\ndef\u0027)\nn \u003d buffer.find(b\u0027\\n\u0027)\ndata \u003d buffer.take_bytes(n + 1)\nassert data \u003d\u003d b\u0027abc\\n\u0027\nassert buffer \u003d\u003d bytearray(b\u0027def\u0027)\n```",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "0f7782ba1813d1902d143b6e3b48d480d5493e2c",
      "old_mode": 33188,
      "old_path": "Doc/whatsnew/3.15.rst",
      "new_id": "fb0755e8ffec5b7611795a52e2c7584d9a304df4",
      "new_mode": 33188,
      "new_path": "Doc/whatsnew/3.15.rst"
    }
  ]
}
