We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 2a11b1b + bf92fbf commit 6718442Copy full SHA for 6718442
doc/sphinx/source/exceptions.rst
@@ -155,17 +155,11 @@ Often you need to create an Exception class that is specialised to a particular
155
{
156
PyObject* m;
157
158
- noddy_NoddyType.tp_new = PyType_GenericNew;
159
- if (PyType_Ready(&noddy_NoddyType) < 0)
160
- return NULL;
161
-
162
m = PyModule_Create(&noddymodule);
163
if (m == NULL)
164
return NULL;
165
166
- Py_INCREF(&noddy_NoddyType);
167
- PyModule_AddObject(m, "Noddy", (PyObject *)&noddy_NoddyType);
168
+
169
/* Initialise exceptions here.
170
*
171
* Firstly a base class exception that inherits from the builtin Exception.
0 commit comments