summaryrefslogtreecommitdiffstats
path: root/Doc/whatsnew
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2024-02-05 16:24:54 (GMT)
committerGitHub <noreply@github.com>2024-02-05 16:24:54 (GMT)
commitb4ba0f73d6eef3da321bb96aafd09dfbc572e95d (patch)
treeb7e4d26504fe8fcb7dcddc469508eab22afda319 /Doc/whatsnew
parent992446dd5bd3fff92ea0f8064fb19eebfe105cef (diff)
downloadcpython-b4ba0f73d6eef3da321bb96aafd09dfbc572e95d.zip
cpython-b4ba0f73d6eef3da321bb96aafd09dfbc572e95d.tar.gz
cpython-b4ba0f73d6eef3da321bb96aafd09dfbc572e95d.tar.bz2
gh-43457: Tkinter: fix design flaws in wm_attributes() (GH-111404)
* When called with a single argument to get a value, it allow to omit the minus prefix. * It can be called with keyword arguments to set attributes. * w.wm_attributes(return_python_dict=True) returns a dict instead of a tuple (it will be the default in future). * Setting wantobjects to 0 no longer affects the result.
Diffstat (limited to 'Doc/whatsnew')
-rw-r--r--Doc/whatsnew/3.13.rst9
1 files changed, 9 insertions, 0 deletions
diff --git a/Doc/whatsnew/3.13.rst b/Doc/whatsnew/3.13.rst
index 77f4fce..c25d413 100644
--- a/Doc/whatsnew/3.13.rst
+++ b/Doc/whatsnew/3.13.rst
@@ -421,6 +421,15 @@ tkinter
:meth:`!tk_busy_current`, and :meth:`!tk_busy_status`.
(Contributed by Miguel, klappnase and Serhiy Storchaka in :gh:`72684`.)
+* The :mod:`tkinter` widget method :meth:`!wm_attributes` now accepts
+ the attribute name without the minus prefix to get window attributes,
+ e.g. ``w.wm_attributes('alpha')`` and allows to specify attributes and
+ values to set as keyword arguments, e.g. ``w.wm_attributes(alpha=0.5)``.
+ Add new optional keyword-only parameter *return_python_dict*: calling
+ ``w.wm_attributes(return_python_dict=True)`` returns the attributes as
+ a dict instead of a tuple.
+ (Contributed by Serhiy Storchaka in :gh:`43457`.)
+
* Add support of the "vsapi" element type in
the :meth:`~tkinter.ttk.Style.element_create` method of
:class:`tkinter.ttk.Style`.