mirror of
				https://github.com/Brandon-Rozek/matmod.git
				synced 2025-11-03 03:11:12 +00:00 
			
		
		
		
	Use partition instead of split/join
This commit is contained in:
		
							parent
							
								
									2d8540f5c2
								
							
						
					
					
						commit
						1a4857429f
					
				
					 1 changed files with 1 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -45,10 +45,7 @@ class SourceFile:
 | 
			
		|||
            self.reststr = next(self.fileobj).strip()
 | 
			
		||||
            self.current_line += 1
 | 
			
		||||
 | 
			
		||||
        tokens = self.reststr.split(" ")
 | 
			
		||||
        next_token = tokens[0]
 | 
			
		||||
        self.reststr = " ".join(tokens[1:])
 | 
			
		||||
 | 
			
		||||
        next_token, _, self.reststr = self.reststr.partition(" ")
 | 
			
		||||
        return next_token
 | 
			
		||||
 | 
			
		||||
class UglyHeader:
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue