summaryrefslogtreecommitdiffstats
path: root/Lib/lib-tk
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/lib-tk')
-rw-r--r--Lib/lib-tk/Tkinter.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/lib-tk/Tkinter.py b/Lib/lib-tk/Tkinter.py
index d567467..9d5fa6f 100644
--- a/Lib/lib-tk/Tkinter.py
+++ b/Lib/lib-tk/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=='.':