Skip to content

[3.12] gh-110050: Adjust the newline position in the TypeError message of the random.seed call. (GH-110051) #110625

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Lib/random.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@ def seed(self, a=None, version=2):
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
Expand Down