Closed as duplicate
Description
Bug report
Bug description:
>>> type(print).__new__(type(print))
Traceback (most recent call last):
File "<python-input-0>", line 1, in <module>
type(print).__new__(type(print))
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
TypeError: object.__new__(builtin_function_or_method) is not safe, use builtin_function_or_method.__new__()
The type(print).__new__
is not object.__new__
, so the message is wrong. The correct message is "cannot create 'builtin_function_or_method' instances"
CPython versions tested on:
3.13
Operating systems tested on:
Windows