Skip to content

Commit 6718442

Browse files
authored
Merge pull request paulross#17 from gdevanla/patch-2
Remove unneccesary code in the example
2 parents 2a11b1b + bf92fbf commit 6718442

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

doc/sphinx/source/exceptions.rst

+1-7
Original file line numberDiff line numberDiff line change
@@ -155,17 +155,11 @@ Often you need to create an Exception class that is specialised to a particular
155155
{
156156
PyObject* m;
157157
158-
noddy_NoddyType.tp_new = PyType_GenericNew;
159-
if (PyType_Ready(&noddy_NoddyType) < 0)
160-
return NULL;
161-
162158
m = PyModule_Create(&noddymodule);
163159
if (m == NULL)
164160
return NULL;
165161
166-
Py_INCREF(&noddy_NoddyType);
167-
PyModule_AddObject(m, "Noddy", (PyObject *)&noddy_NoddyType);
168-
162+
169163
/* Initialise exceptions here.
170164
*
171165
* Firstly a base class exception that inherits from the builtin Exception.

0 commit comments

Comments
 (0)