mirror of
				https://github.com/python/cpython.git
				synced 2025-10-30 21:21:22 +00:00 
			
		
		
		
	Peter Haight discovered that this code uses a mutable default for cnf
and then (under certain circumstances) can clobber the default! He also submitted this patch as PR#82.
This commit is contained in:
		
							parent
							
								
									3aca65312a
								
							
						
					
					
						commit
						ea7364c7cd
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		|  | @ -14,7 +14,9 @@ | ||||||
| from Tkinter import _cnfmerge | from Tkinter import _cnfmerge | ||||||
| 
 | 
 | ||||||
| class ScrolledText(Text): | class ScrolledText(Text): | ||||||
| 	def __init__(self, master=None, cnf={}, **kw): | 	def __init__(self, master=None, cnf=None, **kw): | ||||||
|  | 		if cnf is None: | ||||||
|  | 			cnf = {} | ||||||
| 		if kw: | 		if kw: | ||||||
| 			cnf = _cnfmerge((cnf, kw)) | 			cnf = _cnfmerge((cnf, kw)) | ||||||
| 		fcnf = {} | 		fcnf = {} | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Guido van Rossum
						Guido van Rossum