mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 05:31:20 +00:00 
			
		
		
		
	Cookie.py shouldn't "bogusly" use string._idmap.
This commit is contained in:
		
							parent
							
								
									7a1af770b9
								
							
						
					
					
						commit
						d76bd69712
					
				
					 2 changed files with 4 additions and 3 deletions
				
			
		|  | @ -305,8 +305,10 @@ class CookieError(Exception): | |||
|     '\375' : '\\375',  '\376' : '\\376',  '\377' : '\\377' | ||||
|     } | ||||
|      | ||||
| _idmap = ''.join(chr(x) for x in xrange(256)) | ||||
| 
 | ||||
| def _quote(str, LegalChars=_LegalChars, | ||||
|            idmap=string._idmap, translate=string.translate): | ||||
|            idmap=_idmap, translate=string.translate): | ||||
|     # | ||||
|     # If the string does not need to be double-quoted, | ||||
|     # then just return the string.  Otherwise, surround | ||||
|  | @ -440,7 +442,7 @@ def isReservedKey(self, K): | |||
| 
 | ||||
|     def set(self, key, val, coded_val, | ||||
|             LegalChars=_LegalChars, | ||||
|             idmap=string._idmap, translate=string.translate ): | ||||
|             idmap=_idmap, translate=string.translate): | ||||
|         # First we verify that the key isn't a reserved word | ||||
|         # Second we make sure it only contains legal characters | ||||
|         if key.lower() in self._reserved: | ||||
|  |  | |||
|  | @ -35,7 +35,6 @@ | |||
| 
 | ||||
| # Case conversion helpers | ||||
| # Use str to convert Unicode literal in case of -U | ||||
| # Note that Cookie.py bogusly uses _idmap :( | ||||
| l = map(chr, xrange(256)) | ||||
| _idmap = str('').join(l) | ||||
| del l | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Georg Brandl
						Georg Brandl