]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.13] gh-138295: Fix a grammar issue in the descriptor HOWTO (GH-138296) (GH-138300)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sun, 31 Aug 2025 15:59:22 +0000 (17:59 +0200)
committerGitHub <noreply@github.com>
Sun, 31 Aug 2025 15:59:22 +0000 (15:59 +0000)
gh-138295: Fix a grammar issue in the descriptor HOWTO (GH-138296)

"an str" -> "a str"
(cherry picked from commit 552cf86b83e8aafebcfe9abbc77101bdbfda14c8)

Co-authored-by: Fangyi Zhou <me@fangyi.io>
Doc/howto/descriptor.rst

index 50a368b7712938042406471cb6a8c9a99c6ee862..ba6dd4e0505f537f976de2fc1170700ed86b52a4 100644 (file)
@@ -420,7 +420,7 @@ Here are three practical data validation utilities:
 
         def validate(self, value):
             if not isinstance(value, str):
-                raise TypeError(f'Expected {value!r} to be an str')
+                raise TypeError(f'Expected {value!r} to be a str')
             if self.minsize is not None and len(value) < self.minsize:
                 raise ValueError(
                     f'Expected {value!r} to be no smaller than {self.minsize!r}'