Skip to content

The TypeError message from random.seed call has a seemingly unintentional newline in the middle #110050

Closed
@yilei

Description

@yilei

Bug report

Bug description:

>>> import random
>>> random.seed(random)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "...lib/python3.12/random.py", line 167, in seed
    raise TypeError('The only supported seed types are: None,\n'
TypeError: The only supported seed types are: None,
int, float, str, bytes, and bytearray.

It appears that the newline in the middle added in #25874 isn't intentional.

I'll send a PR.

CPython versions tested on:

3.12

Operating systems tested on:

Linux

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibPython modules in the Lib dirtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions