Continuing indentation
Tim Chase
python.list at tim.thechases.com
Fri Mar 4 21:49:27 EST 2016
On 2016-03-04 17:17, sohcahtoa82 at gmail.com wrote:
> x \
> = \
> 5
> if \
> y \
> == \
> z:
> print \
> 'this is terrible'
> print \
> 'but still not incorrect
>
> It would be terrible, still but not incorrect.
And has the sociopathic benefit that the diffs make it quite clear
what changed. None of this
looking-deep-into-lines-to-see-what-changed.
x \
= \
5
if \
y \
- != \
+ == \
z:
print \
'this is terrible'
print \
'but still not incorrect
Still terrible. But not quite as useless as a knee-jerk reaction
might suggest.
I actually hacked together a binary-diff something like this,
emitting every hex-formatted byte of each file on its own line, then
diffing the two results. I could see doing something similar to diff
Python ASTs.
-tkc
More information about the Python-list
mailing list