Changeset 2179 for nappy/trunk/naFile.py


Ignore:
Timestamp:
19/02/07 13:34:46 (13 years ago)
Author:
domlowe
Message:

Improved performance of two Nappy functions - readItemsFromUnknownLines and _checkForBlankLines

File:
1 edited

Legend:

Unmodified
Added
Removed
  • nappy/trunk/naFile.py

    r366 r2179  
    113113        rtlines=[] 
    114114        for line in datalines: 
    115             if re.match(r"^[\s\n\t\r]*$", line): 
     115            #if re.match(r"^[\s\n\t\r]*$", line): 
     116            if not line.strip(): #looks for blank line, quicker than reg ex 
    116117                empties=1 
    117118            else: 
     
    274275            datalines=self._readData1(datalines, m) 
    275276            datalines=self._readData2(datalines, m) 
    276             m=m+1     
    277  
     277            m=m+1 
     278             
Note: See TracChangeset for help on using the changeset viewer.