summaryrefslogtreecommitdiffstats
path: root/Lib/tkinter
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>1997-05-27 22:45:10 (GMT)
committerFred Drake <fdrake@acm.org>1997-05-27 22:45:10 (GMT)
commitc8296db67df8955580be1fbb0ac5754b3c396107 (patch)
tree60594d8bc3d85c27c8abdb5ae6df0c7c43de23d7 /Lib/tkinter
parentd812c07e0e64048275eb36c51754003405dbeaf7 (diff)
downloadcpython-c8296db67df8955580be1fbb0ac5754b3c396107.zip
cpython-c8296db67df8955580be1fbb0ac5754b3c396107.tar.gz
cpython-c8296db67df8955580be1fbb0ac5754b3c396107.tar.bz2
Widget._setup(): Support name=None in a similar way to the handling of other
Tkinter keyword parameters.
Diffstat (limited to 'Lib/tkinter')
-rwxr-xr-xLib/tkinter/Tkinter.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/tkinter/Tkinter.py b/Lib/tkinter/Tkinter.py
index d567467..9d5fa6f 100755
--- a/Lib/tkinter/Tkinter.py
+++ b/Lib/tkinter/Tkinter.py
@@ -890,10 +890,11 @@ class Widget(Misc, Pack, Place, Grid):
_default_root = master
self.master = master
self.tk = master.tk
+ name = None
if cnf.has_key('name'):
name = cnf['name']
del cnf['name']
- else:
+ if not name:
name = `id(self)`
self._name = name
if master._w=='.':