Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #74424 > unrolled thread

python-aware wdiff?

Started byRoy Smith <roy@panix.com>
First post2014-07-14 11:12 -0400
Last post2014-07-14 11:12 -0400
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python


Contents

  python-aware wdiff? Roy Smith <roy@panix.com> - 2014-07-14 11:12 -0400

#74424 — python-aware wdiff?

FromRoy Smith <roy@panix.com>
Date2014-07-14 11:12 -0400
Subjectpython-aware wdiff?
Message-ID<mailman.11798.1405350785.18130.python-list@python.org>

[Multipart message — attachments visible in raw view] — view raw

Does anybody know of a wdiff-like tool (http://www.gnu.org/software/wdiff/) which is aware of python syntax and can show token changes instead of word changes.  Wdiff is can turn

-    if not metar.is_in_temp_range_f(situation.weather.low_temperature, situation.weather.high_temperature):
+    if not info.is_in_temp_range_f(situation.weather.low_temperature, situation.weather.high_temperature):

into

    if not [-metar.is_in_temp_range_f(situation.weather.low_temperature,-] {+info.is_in_temp_range_f(situation.weather.low_temperature,+} situation.weather.high_temperature):

but what I really want is:

    if not [-metar-]{+info+}.is_in_temp_range_f(situation.weather.low_temperature, situation.weather.high_temperature):

which makes it more obvious that the change is just the one token.  Does such a tool exist?

---
Roy Smith
roy@panix.com



[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web