mirror of
https://github.com/python/cpython
synced 2026-09-26 16:21:04 +03:00
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.
7 lines
477 B
ReStructuredText
7 lines
477 B
ReStructuredText
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.
|