summaryrefslogtreecommitdiffstats
path: root/Lib/tkinter
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2017-03-19 06:40:32 (GMT)
committerGitHub <noreply@github.com>2017-03-19 06:40:32 (GMT)
commitbdf6b910f9ea75609caee498a975af03b6d23f67 (patch)
treeac69902aaaeb9c2e0578181e911a36af201ea1a0 /Lib/tkinter
parentc85a26628ceb9624c96c3064e8b99033c026d8a3 (diff)
downloadcpython-bdf6b910f9ea75609caee498a975af03b6d23f67.zip
cpython-bdf6b910f9ea75609caee498a975af03b6d23f67.tar.gz
cpython-bdf6b910f9ea75609caee498a975af03b6d23f67.tar.bz2
bpo-29776: Use decorator syntax for properties. (#585)
Diffstat (limited to 'Lib/tkinter')
-rw-r--r--Lib/tkinter/ttk.py11
1 files changed, 4 insertions, 7 deletions
diff --git a/Lib/tkinter/ttk.py b/Lib/tkinter/ttk.py
index c474e60..cbaad76 100644
--- a/Lib/tkinter/ttk.py
+++ b/Lib/tkinter/ttk.py
@@ -1577,20 +1577,17 @@ class LabeledScale(Frame):
self.label['text'] = newval
self.after_idle(adjust_label)
-
- def _get_value(self):
+ @property
+ def value(self):
"""Return current scale value."""
return self._variable.get()
-
- def _set_value(self, val):
+ @value.setter
+ def value(self, val):
"""Set new scale value."""
self._variable.set(val)
- value = property(_get_value, _set_value)
-
-
class OptionMenu(Menubutton):
"""Themed OptionMenu, based after tkinter's OptionMenu, which allows
the user to select a value from a menu."""