Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ea7364c

Browse files
committed
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.
1 parent 3aca653 commit ea7364c

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Lib/lib-tk/ScrolledText.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@
1414
from Tkinter import _cnfmerge
1515

1616
class ScrolledText(Text):
17-
def __init__(self, master=None, cnf={}, **kw):
17+
def __init__(self, master=None, cnf=None, **kw):
18+
if cnf is None:
19+
cnf = {}
1820
if kw:
1921
cnf = _cnfmerge((cnf, kw))
2022
fcnf = {}

0 commit comments

Comments
 (0)