Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactoring of difflib.Differ #37095

Closed
cmalamas mannequin opened this issue Aug 27, 2002 · 3 comments
Closed

Refactoring of difflib.Differ #37095

cmalamas mannequin opened this issue Aug 27, 2002 · 3 comments
Assignees
Labels
stdlib Python modules in the Lib dir

Comments

@cmalamas
Copy link
Mannequin

cmalamas mannequin commented Aug 27, 2002

BPO 600984
Nosy @tim-one
Files
  • patch: Patch of difflib from the 2.1.x branch
  • 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 = 'https://github.com/tim-one'
    closed_at = <Date 2003-04-12.01:30:07.000>
    created_at = <Date 2002-08-27.20:54:29.000>
    labels = ['library']
    title = 'Refactoring of difflib.Differ '
    updated_at = <Date 2003-04-12.01:30:07.000>
    user = 'https://bugs.python.org/cmalamas'

    bugs.python.org fields:

    activity = <Date 2003-04-12.01:30:07.000>
    actor = 'nnorwitz'
    assignee = 'tim.peters'
    closed = True
    closed_date = None
    closer = None
    components = ['Library (Lib)']
    creation = <Date 2002-08-27.20:54:29.000>
    creator = 'cmalamas'
    dependencies = []
    files = ['4542']
    hgrepos = []
    issue_num = 600984
    keywords = ['patch']
    message_count = 3.0
    messages = ['41040', '41041', '41042']
    nosy_count = 3.0
    nosy_names = ['tim.peters', 'nnorwitz', 'cmalamas']
    pr_nums = []
    priority = 'normal'
    resolution = 'rejected'
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue600984'
    versions = []

    @cmalamas
    Copy link
    Mannequin Author

    cmalamas mannequin commented Aug 27, 2002

    The difflib.Differ class currently only acts as a helper for
    ndiff, creating human-readable diffs that mimic the Unix
    diff. This patch refactors Differ into two layers:
    BaseDiffer and Differ.

    BaseDiffer contains the workhorse algorithms of the
    current Differ without format-specific code. Instead, it
    adds event handlers that are triggered as the diff is
    calculated. Thus the Differ engine can now be used to
    produce diff reports in other formats (like HTML or XML)
    or to add programmatic behavior --for example to extract
    only inserted XML from an XML feed for faster parsing.

    Differ implements the BaseDiffer API to produce a
    backwards-compatible diff, just like ndiff.

    @cmalamas cmalamas mannequin closed this as completed Aug 27, 2002
    @cmalamas cmalamas mannequin assigned tim-one Aug 27, 2002
    @cmalamas cmalamas mannequin added the stdlib Python modules in the Lib dir label Aug 27, 2002
    @cmalamas cmalamas mannequin closed this as completed Aug 27, 2002
    @cmalamas cmalamas mannequin assigned tim-one Aug 27, 2002
    @cmalamas cmalamas mannequin added the stdlib Python modules in the Lib dir label Aug 27, 2002
    @cmalamas
    Copy link
    Mannequin Author

    cmalamas mannequin commented Aug 27, 2002

    Logged In: YES
    user_id=71233

    Forgot to say that this is a 2.1 patch only as I cannot test 2.2
    yet. Assigned to Tim, since it's 95% his code.

    @nnorwitz
    Copy link
    Mannequin

    nnorwitz mannequin commented Apr 12, 2003

    Logged In: YES
    user_id=33168

    Costas, since this patch would only be applied against 2.3,
    the current patch is not useful. If you are interested in
    forward porting the patch to current code, we can consider
    it then. Thanks.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 9, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    stdlib Python modules in the Lib dir
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant