Compare source code
Grant Edwards
invalid at invalid.invalid
Tue Nov 2 10:14:32 EDT 2010
On 2010-11-01, Peter Pearson <ppearson at nowhere.invalid> wrote:
> On Mon, 1 Nov 2010 22:24:03 +0000 (UTC), Grant Edwards wrote:
>> On 2010-11-01, Lawrence D'Oliveiro <ldo at geek-central.gen.new_zealand> wrote:
>>> In message <8j8am4Fk2jU1 at mid.individual.net>, Peter Pearson wrote:
>>>>
>>>>> diff -b oldfile newfile
>>>>
>>>> Warning: "diff -b" won't detect changes in indentation. Changes in
>>>> indentation can change a Python program.
>>>
>>> I'm getting less and less keen on that particular feature of Python...
>>
>> Why?
>>
>> Other languages have similar problems if you remove salient bits of
>> syntax before comparing two source files files.
>>
>> For exmaple, if you remove all of the curly-braces from two C source
>> files before comparing them, you don't get useful results.
>
> True, but diff doesn't come with an "ignore curly braces" option.
True, but the fact that diff has an option that for Python sources
will produces useless results doesn't seem like a valid indictment of
Python's syntax and semantics.
> I'm not personally repelled by Python's use of significant
> indentation, but I must concede that some awkwardness results from
> assigning significance to something (whitespace) that many tools are
> inclined to treat as insignificant.
However, the human brain does treat whitespace as significant.
--
Grant Edwards grant.b.edwards Yow! I joined scientology
at at a garage sale!!
gmail.com
More information about the Python-list
mailing list