summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Lib/lib-tk/Tkinter.py3
-rwxr-xr-xLib/tkinter/Tkinter.py3
2 files changed, 4 insertions, 2 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=='.':
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=='.':