]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-97928: Partially restore the behavior of tkinter.Text.count() by default (GH-115031)
authorSerhiy Storchaka <storchaka@gmail.com>
Sun, 11 Feb 2024 10:43:14 +0000 (12:43 +0200)
committerGitHub <noreply@github.com>
Sun, 11 Feb 2024 10:43:14 +0000 (12:43 +0200)
commitd2c4baa41ff93cd5695c201d40e20a88458ecc26
tree9cd066f17f0aabe268312d469f94447a4063d592
parent5d2794a16bc1639e6053300c08a78d60526aadf2
gh-97928: Partially restore the behavior of tkinter.Text.count() by default (GH-115031)

By default, it preserves an inconsistent behavior of older Python
versions: packs the count into a 1-tuple if only one or none
options are specified (including 'update'), returns None instead of 0.
Except that setting wantobjects to 0 no longer affects the result.

Add a new parameter return_ints: specifying return_ints=True makes
Text.count() always returning the single count as an integer
instead of a 1-tuple or None.
Doc/whatsnew/3.13.rst
Lib/idlelib/sidebar.py
Lib/test/test_tkinter/test_text.py
Lib/tkinter/__init__.py
Misc/NEWS.d/next/Library/2024-02-05-16-48-06.gh-issue-97928.JZCies.rst [new file with mode: 0644]