From c8296db67df8955580be1fbb0ac5754b3c396107 Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Tue, 27 May 1997 22:45:10 +0000 Subject: Widget._setup(): Support name=None in a similar way to the handling of other Tkinter keyword parameters. --- Lib/lib-tk/Tkinter.py | 3 ++- Lib/tkinter/Tkinter.py | 3 ++- 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=='.': -- cgit v0.12