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.
-
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.user722607– user72260705/05/2011 13:02:54Commented May 5, 2011 at 13:02
-
5@user722607:
difflib
is a pure Python module, there's no C implementation of itEli Bendersky– Eli Bendersky05/05/2011 13:09:22Commented May 5, 2011 at 13:09
difflib
, which is pure Python and already installed.