From: Guido van Rossum Date: Wed, 7 Oct 1998 13:24:13 +0000 (+0000) Subject: Remove a redundant check from list_slice() and list_ass_slice(). X-Git-Tag: v1.5.2a2~118 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2ccaf6f2f9d62828b3ea34720de27e758a673e17;p=python Remove a redundant check from list_slice() and list_ass_slice(). Noted by Greg Stein. --- diff --git a/Objects/listobject.c b/Objects/listobject.c index 4e9ad0cb57..f2c295e859 100644 --- a/Objects/listobject.c +++ b/Objects/listobject.c @@ -326,8 +326,6 @@ list_slice(a, ilow, ihigh) ilow = 0; else if (ilow > a->ob_size) ilow = a->ob_size; - if (ihigh < 0) - ihigh = 0; if (ihigh < ilow) ihigh = ilow; else if (ihigh > a->ob_size) @@ -452,8 +450,6 @@ list_ass_slice(a, ilow, ihigh, v) ilow = 0; else if (ilow > a->ob_size) ilow = a->ob_size; - if (ihigh < 0) - ihigh = 0; if (ihigh < ilow) ihigh = ilow; else if (ihigh > a->ob_size)