This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author cdanis
Recipients cdanis
Date 2020-05-19.20:57:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1589921866.61.0.952751122807.issue40691@roundup.psfhosted.org>
In-reply-to
Content
When difflib.unified_diff is asked to produce a diff of inputs a.txt and b.txt (attached), with 10 context lines, it produces the following:

--- codfw/groupLoadsBySection live
+++ codfw/groupLoadsBySection generated
@@ -90,37 +90,31 @@
     },
     "s4": {
         "api": {
             "db2106": 300,
             "db2110": 100
         },
         "contributions": {
             "db2084:3314": 100,
             "db2091:3314": 100
         },
-        "dump": {
-            "db2073": 100
-        },
-        "logpager": {
-            "db2084:3314": 100,
-            "db2091:3314": 100
-        },
-        "recentchanges": {
-            "db2084:3314": 100,
-            "db2091:3314": 100
-        },
-        "recentchangeslinked": {
-            "db2084:3314": 100,
-            "db2091:3314": 100
-        },
-        "vslow": {
-            "db2073": 100
+        "logpager": {
+            "db2084:3314": 100,
+            "db2091:3314": 100
+        },
+        "recentchanges": {
+            "db2084:3314": 100,
+            "db2091:3314": 100
+        },
+        "recentchangeslinked": {
+            "db2084:3314": 100,
+            "db2091:3314": 100
         },
         "watchlist": {
             "db2084:3314": 100,
             "db2091:3314": 100
         }
     },
     "s5": {
         "api": {
             "db2075": 300,
             "db2128": 100


However, this could simply and much more readably be rendered as:

@@ -90,38 +90,32 @@
   },
   "s4": {
     "api": {
       "db2106": 3,
       "db2110": 1
     },
     "contributions": {
       "db2084:3314": 1,
       "db2091:3314": 1
     },
-    "dump": {
-      "db2073": 1
-    },
     "logpager": {
       "db2084:3314": 1,
       "db2091:3314": 1
     },
     "recentchanges": {
       "db2084:3314": 1,
       "db2091:3314": 1
     },
     "recentchangeslinked": {
       "db2084:3314": 1,
       "db2091:3314": 1
     },
-    "vslow": {
-      "db2073": 1
-    },
     "watchlist": {
       "db2084:3314": 1,
       "db2091:3314": 1
     }
   },
   "s5": {
     "api": {
       "db2059": 1,
       "db2066": 1
     },

(This is what diff -u10 produces.)
History
Date User Action Args
2020-05-19 20:57:46cdanissetrecipients: + cdanis
2020-05-19 20:57:46cdanissetmessageid: <1589921866.61.0.952751122807.issue40691@roundup.psfhosted.org>
2020-05-19 20:57:46cdanislinkissue40691 messages
2020-05-19 20:57:46cdaniscreate