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.

classification
Title: Fix indentation in range_item
Type: Stage:
Components: Interpreter Core Versions: Python 3.0
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: belopolsky, benjamin.peterson
Priority: normal Keywords: patch

Created on 2008-04-25 14:08 by belopolsky, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
range.diff belopolsky, 2008-04-25 14:08
Messages (3)
msg65811 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2008-04-25 20:37
I don't really see what's wrong with the indentation.
msg65813 - (view) Author: Alexander Belopolsky (belopolsky) * (Python committer) Date: 2008-04-25 21:08
On Fri, Apr 25, 2008 at 4:37 PM, Benjamin Peterson
<report@bugs.python.org> wrote:
>
>  I don't really see what's wrong with the indentation.

Sorry, I thought it would be obvious from the patch. As of revision
62505, Objects/rangeobject.c:216 has the following code:

216    if (i < 0 || i >= len) {
217        if (!PyErr_Occurred())
218            PyErr_SetString(PyExc_IndexError,
219                            "range object index out of range");
220            return NULL;
221        }

Note that the inner if has no { after the condition and therefore
terminates at line 219.  Thus the next line should be aligned with the
inner if and  the } at line 221 should be aligned with the outer if.
msg65814 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2008-04-25 21:15
Ok. I see now. Fixed in r62506.
History
Date User Action Args
2022-04-11 14:56:33adminsetgithub: 46941
2008-04-25 21:15:39benjamin.petersonsetstatus: open -> closed
resolution: fixed
messages: + msg65814
2008-04-25 21:08:32belopolskysetmessages: + msg65813
2008-04-25 20:37:55benjamin.petersonsetnosy: + benjamin.peterson
messages: + msg65811
2008-04-25 14:08:36belopolskycreate