diff options
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/tkinter.ttk.rst | 11 | ||||
-rw-r--r-- | Doc/whatsnew/3.8.rst | 8 |
2 files changed, 13 insertions, 6 deletions
diff --git a/Doc/library/tkinter.ttk.rst b/Doc/library/tkinter.ttk.rst index debbc81..9c0c4cd 100644 --- a/Doc/library/tkinter.ttk.rst +++ b/Doc/library/tkinter.ttk.rst @@ -1094,14 +1094,13 @@ ttk.Treeview the tree. - .. method:: selection(selop=None, items=None) + .. method:: selection() - If *selop* is not specified, returns selected items. Otherwise, it will - act according to the following selection methods. + Returns a tuple of selected items. - .. deprecated-removed:: 3.6 3.8 - Using ``selection()`` for changing the selection state is deprecated. - Use the following selection methods instead. + .. versionchanged:: 3.8 + ``selection()`` no longer takes arguments. For changing the selection + state use the following selection methods. .. method:: selection_set(*items) diff --git a/Doc/whatsnew/3.8.rst b/Doc/whatsnew/3.8.rst index 59f1883..8a3f9b0 100644 --- a/Doc/whatsnew/3.8.rst +++ b/Doc/whatsnew/3.8.rst @@ -113,3 +113,11 @@ This section lists previously described changes and other bugfixes that may require changes to your code. +Changes in the Python API +------------------------- + +* The :meth:`~tkinter.ttk.Treeview.selection` method of the + :class:`tkinter.ttk.Treeview` class no longer takes arguments. Using it with + arguments for changing the selection was deprecated in Python 3.6. Use + specialized methods like :meth:`~tkinter.ttk.Treeview.selection_set` for + changing the selection. (Contributed by Serhiy Storchaka in :issue:`31508`.) |