Author vstinner
Recipients Guido.van.Rossum, Mark.Shannon, christian.heimes, corona10, erlendaasland, gvanrossum, pablogsal, serhiy.storchaka, shihai1991, shreyanavigyan, vstinner
Date 2021-04-30.11:05:25
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
PyStdPrinter_Type implements tp_new, but tp_init always fail:

static int
stdprinter_init(PyObject *self, PyObject *args, PyObject *kwds)
                    "cannot create 'stderrprinter' instances");
    return -1;

Maybe it should use the Py_TPFLAGS_IMMUTABLETYPE flag instead?

Instances must be created with PyFile_NewStdPrinter() which doesn't use tp_new nor tp_init.

Erlend: do you want to propose a PR?
Date User Action Args
2021-04-30 11:05:25vstinnersetrecipients: + vstinner, gvanrossum, christian.heimes, Mark.Shannon, serhiy.storchaka, Guido.van.Rossum, corona10, pablogsal, shihai1991, erlendaasland, shreyanavigyan
2021-04-30 11:05:25vstinnersetmessageid: <>
2021-04-30 11:05:25vstinnerlinkissue43908 messages
2021-04-30 11:05:25vstinnercreate