diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2022-10-19 09:30:14 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-19 09:30:14 (GMT) |
commit | e4ec8de6fa6f0a07e64f6a3e3f894926b4b0652d (patch) | |
tree | 30cd723475774de40d91035af10a14e720b712b6 /Lib/tkinter | |
parent | 1b684c8f5f738b56f859e5c87b7280610b90399f (diff) | |
download | cpython-e4ec8de6fa6f0a07e64f6a3e3f894926b4b0652d.zip cpython-e4ec8de6fa6f0a07e64f6a3e3f894926b4b0652d.tar.gz cpython-e4ec8de6fa6f0a07e64f6a3e3f894926b4b0652d.tar.bz2 |
gh-97928: Fix handling options starting with "-" in tkinter.Text.count() (GH-98436)
Previously they were silently ignored. Now they are errors.
Diffstat (limited to 'Lib/tkinter')
-rw-r--r-- | Lib/tkinter/__init__.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/tkinter/__init__.py b/Lib/tkinter/__init__.py index 3564469..a8e7bf4 100644 --- a/Lib/tkinter/__init__.py +++ b/Lib/tkinter/__init__.py @@ -3648,7 +3648,7 @@ class Text(Widget, XView, YView): "lines", "xpixels" and "ypixels". There is an additional possible option "update", which if given then all subsequent options ensure that any possible out of date information is recalculated.""" - args = ['-%s' % arg for arg in args if not arg.startswith('-')] + args = ['-%s' % arg for arg in args] args += [index1, index2] res = self.tk.call(self._w, 'count', *args) or None if res is not None and len(args) <= 3: |