python / python/cpython

Promote difflib._mdiff() to public API

Open
#129,922 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

stdlib type-feature
Dominant language
Python
Stars
77.2k
Forks
35.9k
PR merge metrics
PR metrics pending

Description

Feature or enhancement

Proposal:

Using _mdiff() method in difflib is useful to crate a custom HTML table different to what make_table() generates.
The _mdiff() method was last changed 9 years ago^1. So the method seems to be stable.
Consider promoting this method to the public API.

Has this already been discussed elsewhere?

I have already discussed this feature proposal on Discourse

Links to previous discussion of this feature:
Linked PRs
  • gh-156823

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read Lib/difflib.py around the _mdiff() implementation and review the linked Discourse discussion. Check gh-156823 first, since the issue identifies an existing linked PR; completion would involve deciding whether _mdiff() should become part of Python's public difflib API.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.