summaryrefslogtreecommitdiffstats
path: root/Objects/rangeobject.c
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2004-08-08 06:29:10 (GMT)
committerTim Peters <tim.peters@gmail.com>2004-08-08 06:29:10 (GMT)
commitd976ab7caf098eecf44173bbce8101f13ce79d86 (patch)
tree1e5899685dffc05476d62780d671f4a2f39270b3 /Objects/rangeobject.c
parentf3f57473ed97f7d0c4862639bbf29baef77de3a4 (diff)
downloadcpython-d976ab7caf098eecf44173bbce8101f13ce79d86.zip
cpython-d976ab7caf098eecf44173bbce8101f13ce79d86.tar.gz
cpython-d976ab7caf098eecf44173bbce8101f13ce79d86.tar.bz2
Trimmed trailing whitespace.
Diffstat (limited to 'Objects/rangeobject.c')
-rw-r--r--Objects/rangeobject.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/Objects/rangeobject.c b/Objects/rangeobject.c
index 132d4cc..dbfab9f 100644
--- a/Objects/rangeobject.c
+++ b/Objects/rangeobject.c
@@ -32,13 +32,13 @@ PyRange_New(long start, long len, long step, int reps)
else {
long last = start + (len - 1) * step;
if ((step > 0) ?
- (last > (PyInt_GetMax() - step)) :
+ (last > (PyInt_GetMax() - step)) :
(last < (-1 - PyInt_GetMax() - step))) {
PyErr_SetString(PyExc_OverflowError,
"integer addition");
Py_DECREF(obj);
return NULL;
- }
+ }
}
obj->start = start;
obj->len = len;
@@ -145,7 +145,7 @@ static PyObject *
range_repr(rangeobject *r)
{
PyObject *rtn;
-
+
if (r->start == 0 && r->step == 1)
rtn = PyString_FromFormat("xrange(%ld)",
r->start + r->len * r->step);
@@ -211,7 +211,7 @@ PyTypeObject PyRange_Type = {
0, /* tp_weaklistoffset */
(getiterfunc)range_iter, /* tp_iter */
0, /* tp_iternext */
- range_methods, /* tp_methods */
+ range_methods, /* tp_methods */
0, /* tp_members */
0, /* tp_getset */
0, /* tp_base */
@@ -284,7 +284,7 @@ range_reverse(PyObject *seq)
static PyObject *
rangeiter_next(rangeiterobject *r)
{
- if (r->index < r->len)
+ if (r->index < r->len)
return PyInt_FromLong(r->start + (r->index++) * r->step);
return NULL;
}