Issue #26304: Change "allows to <verb>" to "allows <verb>ing" or similar
The original form is incorrect grammar and feels awkward, even though the
meaning is clear.
diff --git a/Lib/ctypes/__init__.py b/Lib/ctypes/__init__.py
index 4e97c15..77b020a 100644
--- a/Lib/ctypes/__init__.py
+++ b/Lib/ctypes/__init__.py
@@ -386,8 +386,8 @@
return func
class PyDLL(CDLL):
- """This class represents the Python library itself. It allows to
- access Python API functions. The GIL is not released, and
+ """This class represents the Python library itself. It allows
+ accessing Python API functions. The GIL is not released, and
Python exceptions are handled correctly.
"""
_func_flags_ = _FUNCFLAG_CDECL | _FUNCFLAG_PYTHONAPI
diff --git a/Lib/lib-tk/Tkinter.py b/Lib/lib-tk/Tkinter.py
index b4f6b3c..687a2ef 100644
--- a/Lib/lib-tk/Tkinter.py
+++ b/Lib/lib-tk/Tkinter.py
@@ -2486,7 +2486,7 @@
self.tk.call(self._w, 'toggle')
class Entry(Widget, XView):
- """Entry widget which allows to display simple text."""
+ """Entry widget which allows displaying simple text."""
def __init__(self, master=None, cnf={}, **kw):
"""Construct an entry widget with the parent MASTER.
@@ -2682,7 +2682,7 @@
itemconfig = itemconfigure
class Menu(Widget):
- """Menu widget which allows to display menu bars, pull-down menus and pop-up menus."""
+ """Menu widget which allows displaying menu bars, pull-down menus and pop-up menus."""
def __init__(self, master=None, cnf={}, **kw):
"""Construct menu widget with the parent MASTER.
diff --git a/Lib/test/test_strptime.py b/Lib/test/test_strptime.py
index e309d06..a3ab426 100644
--- a/Lib/test/test_strptime.py
+++ b/Lib/test/test_strptime.py
@@ -190,7 +190,7 @@
def test_whitespace_substitution(self):
# When pattern contains whitespace, make sure it is taken into account
- # so as to not allow to subpatterns to end up next to each other and
+ # so as to not allow subpatterns to end up next to each other and
# "steal" characters from each other.
pattern = self.time_re.pattern('%j %H')
self.assertFalse(re.match(pattern, "180"))