[Numpy-discussion] Tabs in numarray code

Todd Miller jmiller at stsci.edu
Fri Jan 16 08:15:02 EST 2004


On Fri, 2004-01-16 at 11:09, Todd Miller wrote:
> On Fri, 2004-01-16 at 10:47, Edward C. Jones wrote:
> > What are the policies about tab characters in numarray Python and C 
> > code? What are the policies about indentation in numarray Python and C code?
> 
> The policy is "no tabs".
> Indentation in Python and C is 5 spaces per level.

Actually, I meant *4* spaces, and enforcement is somewhat worse than I
thought.

> Enforcement of the policies is obviously currently lacking.
> 
> Todd
> 
> > 
> > The following small program found a bunch of tabs in numarray code:
> > --------
> > #! /usr/local/bin/python
> > 
> > import os
> > 
> > topdir = '/usr/local/src/numarray-0.8/'
> > for dirpath, dirnames, filenames in os.walk(topdir):
> >     for name in filenames:
> >         if name.endswith('.py'):
> >             fullname = os.path.join(dirpath, name)
> >             lines = file(fullname, 'r').read().splitlines()
> >             for i, line in enumerate(lines):
> >                 if '\t' in line:
> >                     print fullname[len(topdir):], i+1, line
> > 
> > 
> > 
> > 
> > -------------------------------------------------------
> > The SF.Net email is sponsored by EclipseCon 2004
> > Premiere Conference on Open Tools Development and Integration
> > See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
> > http://www.eclipsecon.org/osdn
> > _______________________________________________
> > Numpy-discussion mailing list
> > Numpy-discussion at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/numpy-discussion
> -- 
> Todd Miller 			
> Space Telescope Science Institute
> 3700 San Martin Drive
> Baltimore MD, 21030
> (410) 338 - 4576
> 
> 
> 
> -------------------------------------------------------
> The SF.Net email is sponsored by EclipseCon 2004
> Premiere Conference on Open Tools Development and Integration
> See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
> http://www.eclipsecon.org/osdn
> _______________________________________________
> Numpy-discussion mailing list
> Numpy-discussion at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/numpy-discussion
-- 
Todd Miller 			
Space Telescope Science Institute
3700 San Martin Drive
Baltimore MD, 21030
(410) 338 - 4576





More information about the NumPy-Discussion mailing list