Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #74436
| References | <D72E3D69-9015-44C2-8374-CF6CD57F501D@panix.com> <lq1d0d$5ep$1@ger.gmane.org> |
|---|---|
| From | Ian Kelly <ian.g.kelly@gmail.com> |
| Date | 2014-07-14 14:59 -0600 |
| Subject | Re: python-aware wdiff? |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.11809.1405371597.18130.python-list@python.org> (permalink) |
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 comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: python-aware wdiff? Ian Kelly <ian.g.kelly@gmail.com> - 2014-07-14 14:59 -0600
csiph-web