diff -r c40b573c9f7a Lib/tkinter/__init__.py --- a/Lib/tkinter/__init__.py Sun Nov 03 14:34:25 2013 +0200 +++ b/Lib/tkinter/__init__.py Sun Nov 03 14:57:01 2013 +0200 @@ -2857,10 +2857,16 @@ relief, repeatdelay, repeatinterval, takefocus, troughcolor, width.""" Widget.__init__(self, master, 'scrollbar', cnf, kw) - def activate(self, index): - """Display the element at INDEX with activebackground and activerelief. - INDEX can be "arrow1","slider" or "arrow2".""" - self.tk.call(self._w, 'activate', index) + def activate(self, element=None, *, index=None): + """If element is not None and is one of "arrow1", "slider" or "arrow2" + then it is marked as active. Otherwise the current active element is + returned, or None is returned in case no element is active.""" + if index is not None: + warnings.warn("The 'index' keyword argument is deprecated and " + "will be removed in 3.5. Use 'element' instead.", + DeprecationWarning, 2) + element = index + return self.tk.call(self._w, 'activate', element) or None def delta(self, deltax, deltay): """Return the fractional change of the scrollbar setting if it would be moved by DELTAX or DELTAY pixels.""" @@ -2878,10 +2884,10 @@ """Return the current fractional values (upper and lower end) of the slider position.""" return self._getdoubles(self.tk.call(self._w, 'get')) - def set(self, *args): + def set(self, first, last): """Set the fractional values of the slider position (upper and lower ends as value between 0 and 1).""" - self.tk.call((self._w, 'set') + args) + self.tk.call(self._w, 'set', first, last)