mirror of
https://github.com/python/cpython
synced 2026-09-28 03:33:18 +03:00
gh-66410: Do not stringify arguments of Tkinter callback (GH-98592)
Callbacks registered in the tkinter module now take arguments as various Python objects (int, float, bytes, tuple), not just str. To restore the previous behavior set tkinter module global wantobject to 1 before creating the Tk object or call the wantobject() method of the Tk object with argument 1. Calling it with argument 2 restores the current default behavior.
This commit is contained in:
parent
b60d4c0d53
commit
65f5e586a1
7 changed files with 60 additions and 25 deletions
|
|
@ -0,0 +1,7 @@
|
|||
Callbacks registered in the :mod:`tkinter` module now take arguments as
|
||||
various Python objects (``int``, ``float``, ``bytes``, ``tuple``), not just
|
||||
``str``. To restore the previous behavior set :mod:`!tkinter` module global
|
||||
:data:`~tkinter.wantobject` to ``1`` before creating the
|
||||
:class:`~tkinter.Tk` object or call the :meth:`~tkinter.Tk.wantobject`
|
||||
method of the :class:`!Tk` object with argument ``1``. Calling it with
|
||||
argument ``2`` restores the current default behavior.
|
||||
Loading…
Add table
Add a link
Reference in a new issue