Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!backfill.erje.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed4a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.027 X-Spam-Evidence: '*H*': 0.95; '*S*': 0.00; 'syntax': 0.04; 'url:software': 0.09; 'python': 0.11; 'changes': 0.15; 'received:166.84': 0.16; 'received:166.84.1': 0.16; 'received:166.84.1.89': 0.16; 'received:mailbackend.panix.com': 0.16; 'received:panix.com': 0.16; 'roy': 0.16; 'skip:[ 60': 0.16; 'to:name:python list': 0.16; 'url:gnu': 0.16; 'subject:python': 0.16; 'url:)': 0.16; 'received:10.0.1': 0.19; 'received:166': 0.19; '---': 0.24; 'skip:s 30': 0.35; 'tool': 0.35; 'anybody': 0.35; 'but': 0.35; 'really': 0.36; 'charset:us-ascii': 0.36; 'subject:?': 0.36; 'received:10.0': 0.36; 'url:org': 0.36; 'turn': 0.37; 'received:10': 0.37; 'to:addr:python-list': 0.38; 'does': 0.39; 'to:addr:python.org': 0.39; 'skip:i 50': 0.60; 'header :Message-Id:1': 0.63; 'show': 0.63; 'such': 0.63; 'more': 0.64; 'skip:m 50': 0.68; 'smith': 0.68; 'url:info': 0.73; 'obvious': 0.74; 'email addr:panix.com': 0.84 From: Roy Smith Content-Type: multipart/alternative; boundary="Apple-Mail=_FBA5A67E-84BF-4985-AB54-7415498B18D6" Date: Mon, 14 Jul 2014 11:12:56 -0400 Subject: python-aware wdiff? To: Python List Mime-Version: 1.0 (Apple Message framework v1283) X-Mailer: Apple Mail (2.1283) X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 78 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1405350785 news.xs4all.nl 2965 [2001:888:2000:d::a6]:48898 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:74424 --Apple-Mail=_FBA5A67E-84BF-4985-AB54-7415498B18D6 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii 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 --Apple-Mail=_FBA5A67E-84BF-4985-AB54-7415498B18D6 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii Does = anybody know of a wdiff-like tool (http://www.gnu.org/software/wd= iff/) 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.lo= w_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

=


= --Apple-Mail=_FBA5A67E-84BF-4985-AB54-7415498B18D6--