From 4aef67d47e987885d1ad5a8777413c796aaf0f44 Mon Sep 17 00:00:00 2001 From: Fangyi Zhou Date: Sun, 31 Aug 2025 16:28:31 +0100 Subject: [PATCH] gh-138295: Fix a grammar issue in error message in custom validator "an str" -> "a str" --- Doc/howto/descriptor.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/howto/descriptor.rst b/Doc/howto/descriptor.rst index f6c3e473f1c36d..9d5a9ac8b718cb 100644 --- a/Doc/howto/descriptor.rst +++ b/Doc/howto/descriptor.rst @@ -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}'