mirror of
				https://github.com/python/cpython.git
				synced 2025-10-30 21:21:22 +00:00 
			
		
		
		
	Use reversed() instead of creating a new temporary list.
This commit is contained in:
		
							parent
							
								
									5427df266b
								
							
						
					
					
						commit
						f25a38e568
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		|  | @ -1410,7 +1410,7 @@ def record_sub_info(match_object,sub_info=sub_info): | ||||||
|             change_re.sub(record_sub_info,markers) |             change_re.sub(record_sub_info,markers) | ||||||
|             # process each tuple inserting our special marks that won't be |             # process each tuple inserting our special marks that won't be | ||||||
|             # noticed by an xml/html escaper. |             # noticed by an xml/html escaper. | ||||||
|             for key,(begin,end) in sub_info[::-1]: |             for key,(begin,end) in reversed(sub_info): | ||||||
|                 text = text[0:begin]+'\0'+key+text[begin:end]+'\1'+text[end:] |                 text = text[0:begin]+'\0'+key+text[begin:end]+'\1'+text[end:] | ||||||
|             text = text[2:] |             text = text[2:] | ||||||
|         # Handle case of add/delete entire line |         # Handle case of add/delete entire line | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Raymond Hettinger
						Raymond Hettinger