diff options
author | Guido van Rossum <guido@python.org> | 1994-06-27 07:55:59 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1994-06-27 07:55:59 (GMT) |
commit | 535cf0cbe218c81f3b70bfa2fe7ef45636713ad3 (patch) | |
tree | 5168503cdca9fcb8531f5cb5a71b520fabad1dff /Lib/tkinter | |
parent | aec5dc9f67301aa0ebb975ddf6a29279c374c972 (diff) | |
download | cpython-535cf0cbe218c81f3b70bfa2fe7ef45636713ad3.zip cpython-535cf0cbe218c81f3b70bfa2fe7ef45636713ad3.tar.gz cpython-535cf0cbe218c81f3b70bfa2fe7ef45636713ad3.tar.bz2 |
Redo these changes:
(Menu.index): return int or None, not string
(Widget.__getitem__): use splitlist, not split
Diffstat (limited to 'Lib/tkinter')
-rwxr-xr-x | Lib/tkinter/Tkinter.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/tkinter/Tkinter.py b/Lib/tkinter/Tkinter.py index 4d2dd3a..2c3390b 100755 --- a/Lib/tkinter/Tkinter.py +++ b/Lib/tkinter/Tkinter.py @@ -583,7 +583,7 @@ class Widget(Misc, Pack, Place): apply(self.tk.call, (self._w, 'configure') + self._options(cnf)) def __getitem__(self, key): - v = self.tk.split(self.tk.call( + v = self.tk.splitlist(self.tk.call( self._w, 'configure', '-' + key)) return v[4] def __setitem__(self, key, value): @@ -940,7 +940,9 @@ class Menu(Widget): apply(self.tk.call, (self._w, 'entryconfigure', index) + self._options(cnf)) def index(self, index): - return self.tk.call(self._w, 'index', index) + i = self.tk.call(self._w, 'index', index) + if i == 'none': return None + return self.tk.getint(i) def invoke(self, index): return self.tk.call(self._w, 'invoke', index) def post(self, x, y): |