mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
gh-97928: Fix handling options starting with "-" in tkinter.Text.count() (GH-98436)
Previously they were silently ignored. Now they are errors.
This commit is contained in:
parent
1b684c8f5f
commit
e4ec8de6fa
3 changed files with 4 additions and 4 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue