From: Guido van Rossum Date: Wed, 12 Feb 1997 16:49:57 +0000 (+0000) Subject: Put support for a cnf dictionary back in, since it is still supported X-Git-Tag: v1.5a1~385 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=17ca9928188d9d1e22a06b3d562e32616ca64524;p=python Put support for a cnf dictionary back in, since it is still supported by all true Tkinter widgets. (Not that I *like* this module -- it stinks, but until I have something better, I can't nuke it.) --- diff --git a/Lib/lib-tk/ScrolledText.py b/Lib/lib-tk/ScrolledText.py index cf6b2f13ff..4a67f369a2 100644 --- a/Lib/lib-tk/ScrolledText.py +++ b/Lib/lib-tk/ScrolledText.py @@ -14,7 +14,9 @@ from Tkinter import * from Tkinter import _cnfmerge class ScrolledText(Text): - def __init__(self, master=None, **cnf): + def __init__(self, master=None, cnf={}, **kw): + if kw: + cnf = _cnfmerge((cnf, kw)) fcnf = {} for k in cnf.keys(): if type(k) == ClassType or k == 'name': diff --git a/Lib/tkinter/ScrolledText.py b/Lib/tkinter/ScrolledText.py index cf6b2f13ff..4a67f369a2 100755 --- a/Lib/tkinter/ScrolledText.py +++ b/Lib/tkinter/ScrolledText.py @@ -14,7 +14,9 @@ from Tkinter import * from Tkinter import _cnfmerge class ScrolledText(Text): - def __init__(self, master=None, **cnf): + def __init__(self, master=None, cnf={}, **kw): + if kw: + cnf = _cnfmerge((cnf, kw)) fcnf = {} for k in cnf.keys(): if type(k) == ClassType or k == 'name':