]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-110050: Adjust the newline position in the TypeError message of the random.seed...
authorYilei Yang <hi@mangoumbrella.com>
Tue, 10 Oct 2023 12:16:26 +0000 (05:16 -0700)
committerGitHub <noreply@github.com>
Tue, 10 Oct 2023 12:16:26 +0000 (14:16 +0200)
Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
Lib/random.py

index 1cfc2ba2f025b5d059e1a13ffd07b3d8005195fd..3f7bfd272d65a51053b7a4994024db7d486508a0 100644 (file)
@@ -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