summaryrefslogtreecommitdiffstats
path: root/Python/compile.c
diff options
context:
space:
mode:
authorThomas Wouters <thomas@python.org>2000-08-05 21:37:50 (GMT)
committerThomas Wouters <thomas@python.org>2000-08-05 21:37:50 (GMT)
commite8643c465d0b0a4deb396aa51b585335781c906c (patch)
tree22c37bd15c455b4efb569ded676d4484a26769f9 /Python/compile.c
parentcc22fbe3dbf3374de0827fc52f6765de0af2a7d8 (diff)
downloadcpython-e8643c465d0b0a4deb396aa51b585335781c906c.zip
cpython-e8643c465d0b0a4deb396aa51b585335781c906c.tar.gz
cpython-e8643c465d0b0a4deb396aa51b585335781c906c.tar.bz2
Fix some strange indentation and grammar that have been bugging me for
weeks.
Diffstat (limited to 'Python/compile.c')
-rw-r--r--Python/compile.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/Python/compile.c b/Python/compile.c
index b76586c..72f3be4 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -1249,12 +1249,11 @@ com_subscriptlist(struct compiling *c, node *n, int assigning)
/* Check to make backward compatible slice behavior for '[i:j]' */
if (NCH(n) == 1) {
node *sub = CHILD(n, 0); /* subscript */
- /* Make it is a simple slice.
- Should have exactly one colon. */
- if ((TYPE(CHILD(sub, 0)) == COLON
- || (NCH(sub) > 1 && TYPE(CHILD(sub, 1)) == COLON))
- && (TYPE(CHILD(sub,NCH(sub)-1)) != sliceop))
- {
+ /* 'Basic' slice, should have exactly one colon. */
+ if ((TYPE(CHILD(sub, 0)) == COLON
+ || (NCH(sub) > 1 && TYPE(CHILD(sub, 1)) == COLON))
+ && (TYPE(CHILD(sub,NCH(sub)-1)) != sliceop))
+ {
if (assigning == OP_APPLY)
op = SLICE;
else