[Numpy-svn] r8171 - trunk/numpy/lib

numpy-svn@scip... numpy-svn@scip...
Sat Feb 20 12:15:06 CST 2010


Author: ptvirtan
Date: 2010-02-20 12:15:06 -0600 (Sat, 20 Feb 2010)
New Revision: 8171

Modified:
   trunk/numpy/lib/_iotools.py
Log:
3K: lib: do not slice range() in _iotools needlessly

Modified: trunk/numpy/lib/_iotools.py
===================================================================
--- trunk/numpy/lib/_iotools.py	2010-02-20 18:14:51 UTC (rev 8170)
+++ trunk/numpy/lib/_iotools.py	2010-02-20 18:15:06 UTC (rev 8171)
@@ -190,7 +190,7 @@
         if not line:
             return []
         fixed = self.delimiter
-        slices = [slice(i, i + fixed) for i in range(len(line))[::fixed]]
+        slices = [slice(i, i + fixed) for i in range(0, len(line), fixed)]
         return [line[s] for s in slices]
     #
     def _variablewidth_splitter(self, line):



More information about the Numpy-svn mailing list