[Numpy-discussion] fast putmask implementation

Eric Firing efiring at hawaii.edu
Fri Aug 17 01:32:51 EDT 2007

David M. Cooke wrote:
> On Thu, Aug 16, 2007 at 04:39:02PM -1000, Eric Firing wrote:
>> As far as I can see there is no way of using svn diff to deal with 
>> this automatically, so in the attached revision I have manually removed 
>> chunks resulting solely from whitespace.
>> Is there a better way to handle this problem?  A better way to make diffs?  
>> Or any possibility of routinely cleaning the junk out of the svn source 
>> files?  (Yes, I know--what is junk to me probably results from what others 
>> consider good behavior of the editor.)
> 'svn diff -x -b' might work better (-b gets passed to diff, which makes
> it ignore space changes). Or svn diff -x -w to ignore all whitespace.
> Me, I hate trailing ws too (I've got Emacs set up so that gets
> highlighted as red, which makes me angry :). The hard tabs in C code is
> keeping with the style used in the C Python sources (Emacs even has a
> 'python' C style -- do "C-c . python").


Thank you.  I had tried something like that a while ago without success, 
and now I know why: the '-w' has to be quoted to keep it out of the 
clutches of the shell, so it is "svn diff -x '-w'".  The result is 
attached.  Much better.

As for hard tabs in C Python sources--it is still a bad idea even if the 
BDFL himself does it--very bad for Python, not quite as bad for C, but 
still bad.  Too fragile, too dependent on editor configuration, and in 
numpy, not done consistently--it's a complete mishmash of tabs and 
spaces.  OK, enough of that.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: putmask.diff_w
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20070816/cd1d3648/attachment.ksh>

More information about the NumPy-Discussion mailing list