diff options
author | Eli Bendersky <eliben@gmail.com> | 2011-08-12 08:40:39 (GMT) |
---|---|---|
committer | Eli Bendersky <eliben@gmail.com> | 2011-08-12 08:40:39 (GMT) |
commit | 47fe5c0d51ccec068d189b53703a8ec71d8f3304 (patch) | |
tree | ed0eacd6409a3accebb868981992e7707f37f38f /Doc/extending | |
parent | ff3d3e4c7a0f2e26e814d84c228144209d39c26f (diff) | |
download | cpython-47fe5c0d51ccec068d189b53703a8ec71d8f3304.zip cpython-47fe5c0d51ccec068d189b53703a8ec71d8f3304.tar.gz cpython-47fe5c0d51ccec068d189b53703a8ec71d8f3304.tar.bz2 |
Issue #12672: fix code samples in extending/newtypes.html for PEP-7 compliance
Diffstat (limited to 'Doc/extending')
-rw-r--r-- | Doc/extending/newtypes.rst | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/Doc/extending/newtypes.rst b/Doc/extending/newtypes.rst index 75836c7..1dead7f 100644 --- a/Doc/extending/newtypes.rst +++ b/Doc/extending/newtypes.rst @@ -289,18 +289,16 @@ strings, so we provide a new method:: self = (Noddy *)type->tp_alloc(type, 0); if (self != NULL) { self->first = PyString_FromString(""); - if (self->first == NULL) - { + if (self->first == NULL) { Py_DECREF(self); return NULL; - } + } self->last = PyString_FromString(""); - if (self->last == NULL) - { + if (self->last == NULL) { Py_DECREF(self); return NULL; - } + } self->number = 0; } |