summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>1996-09-26 20:21:26 (GMT)
committerFred Drake <fdrake@acm.org>1996-09-26 20:21:26 (GMT)
commite9c515adc7b09ec76b2f51240dc430c467234eda (patch)
tree2f2eb58071d8b1eca448d5328b8c29f5a950f68b /Lib
parenta1560cfb294f35e5d295b13f372eac0a5d7f59d7 (diff)
downloadcpython-e9c515adc7b09ec76b2f51240dc430c467234eda.zip
cpython-e9c515adc7b09ec76b2f51240dc430c467234eda.tar.gz
cpython-e9c515adc7b09ec76b2f51240dc430c467234eda.tar.bz2
(Canvas.py): Added definition of CanvasItem.cget() as suggested by
Nils Fischbeck.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/lib-tk/Canvas.py1
-rwxr-xr-xLib/tkinter/Canvas.py1
2 files changed, 2 insertions, 0 deletions
diff --git a/Lib/lib-tk/Canvas.py b/Lib/lib-tk/Canvas.py
index 51692e1..6eccd4d 100644
--- a/Lib/lib-tk/Canvas.py
+++ b/Lib/lib-tk/Canvas.py
@@ -22,6 +22,7 @@ class CanvasItem:
self.canvas._w, 'itemconfigure',
self.id, '-' + key))
return v[4]
+ cget = __getitem__
def __setitem__(self, key, value):
self.canvas.itemconfig(self.id, {key: value})
def keys(self):
diff --git a/Lib/tkinter/Canvas.py b/Lib/tkinter/Canvas.py
index 51692e1..6eccd4d 100755
--- a/Lib/tkinter/Canvas.py
+++ b/Lib/tkinter/Canvas.py
@@ -22,6 +22,7 @@ class CanvasItem:
self.canvas._w, 'itemconfigure',
self.id, '-' + key))
return v[4]
+ cget = __getitem__
def __setitem__(self, key, value):
self.canvas.itemconfig(self.id, {key: value})
def keys(self):