I checked out the source code of Python 2.6, and I want to study the diff implementation. However, I can not find the right source file. Could any one point me to whichever source file contains the algorithm implementation?
1 Answer
If by "diff implementation in Python" you mean the difflib module, then here is the source.
There is also a simple diff implementation based on this module in the Python source distribution.
2 Comments
user722607
yes, difflib is exactly what I mean. My point is how python use C to implemention this algorithm. So diff.py is not what I wanted. I think the source file should be under the directory of Modules in python source repository. However, I can not find it.
Eli Bendersky
@user722607:
difflib is a pure Python module, there's no C implementation of it
difflib, which is pure Python and already installed.