From: Yilei Yang Date: Tue, 10 Oct 2023 12:16:26 +0000 (-0700) Subject: gh-110050: Adjust the newline position in the TypeError message of the random.seed... X-Git-Tag: v3.13.0a1~57 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ce43d5f0e1e271289be5510ec80ebb9df77d88e1;p=thirdparty%2FPython%2Fcpython.git gh-110050: Adjust the newline position in the TypeError message of the random.seed call. (#110051) Co-authored-by: Raymond Hettinger --- diff --git a/Lib/random.py b/Lib/random.py index 1cfc2ba2f025..3f7bfd272d65 100644 --- a/Lib/random.py +++ b/Lib/random.py @@ -164,8 +164,8 @@ class Random(_random.Random): a = int.from_bytes(a + _sha512(a).digest()) elif not isinstance(a, (type(None), int, float, str, bytes, bytearray)): - raise TypeError('The only supported seed types are: None,\n' - 'int, float, str, bytes, and bytearray.') + raise TypeError('The only supported seed types are:\n' + 'None, int, float, str, bytes, and bytearray.') super().seed(a) self.gauss_next = None