➜

This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

作者 christian.heimes
收信人 christian.heimes, erlendaasland, pablogsal, serhiy.storchaka, shreyanavigyan, vstinner
日期 2021-04-26.13:47:31
SpamBayes Score -1.0
Marked as misclassified 是
Message-id <1619444851.95.0.165758327108.issue43916@roundup.psfhosted.org>
In-reply-to
内容
I have had this workaround in _hashopenssl.c for a while. Can I get rid of the function with "{Py_tp_new, NULL}" or is there a more generic way to accomplish the same goal?

/* {Py_tp_new, NULL} doesn't block __new__ */
static PyObject *
_disabled_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
    PyErr_Format(PyExc_TypeError,
        "cannot create '%.100s' instances", _PyType_Name(type));
    return NULL;
}
历史
日期 用户 动作 参数
2021-04-26 13:47:31christian.heimes修改recipients: + christian.heimes, vstinner, serhiy.storchaka, pablogsal, erlendaasland, shreyanavigyan
2021-04-26 13:47:31christian.heimes修改messageid: <1619444851.95.0.165758327108.issue43916@roundup.psfhosted.org>
2021-04-26 13:47:31christian.heimes链接issue43916 messages
2021-04-26 13:47:31christian.heimes创建