Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #74436 > unrolled thread
| Started by | Ian Kelly <ian.g.kelly@gmail.com> |
|---|---|
| First post | 2014-07-14 14:59 -0600 |
| Last post | 2014-07-14 14:59 -0600 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: python-aware wdiff? Ian Kelly <ian.g.kelly@gmail.com> - 2014-07-14 14:59 -0600
| From | Ian Kelly <ian.g.kelly@gmail.com> |
|---|---|
| Date | 2014-07-14 14:59 -0600 |
| Subject | Re: python-aware wdiff? |
| Message-ID | <mailman.11809.1405371597.18130.python-list@python.org> |
On Mon, Jul 14, 2014 at 2:01 PM, Terry Reedy <tjreedy@udel.edu> wrote: > The under-known difflib.differ shows within line differences. > Your example would look like: > > - if not metar.is_in_temp_range_f(...): > ? ^^^^^ > + if not info.is_in_temp_range_f > ? ^^^^ > > Deletions and insertions are indicated with '-' and '+'. > I use this routinely, when backporting patches, in a script that differs the > 2.7 and 3.4 versions of repository files. That will produce a minimal diff though, not a syntax-aware diff. If the latter is important, something could probably be cooked up using tokenize and difflib. Not sure how much work that would be.
Back to top | Article view | comp.lang.python
csiph-web