From 536b1ed2f9be3da0fe84de9e3d8bed9cae44593f Mon Sep 17 00:00:00 2001 From: Sei Lisa Date: Fri, 27 Feb 2015 19:18:28 +0100 Subject: [PATCH] Fix comments that mentioned the wrong property. --- lslopt/lslfoldconst.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lslopt/lslfoldconst.py b/lslopt/lslfoldconst.py index e15a8fc..3e55bf5 100644 --- a/lslopt/lslfoldconst.py +++ b/lslopt/lslfoldconst.py @@ -280,12 +280,13 @@ class foldconst(object): lval = child[0] = lval['ch'][0] lnt = lval['nt'] - # Addition of integers, strings, and lists is distributive + # Addition of integers, strings, and lists is associative # Addition of floats, vectors and rotations would be, except # for FP precision. - # TODO: distributive addition of lists - # Distributive lists are trickier, because unlike the others, - # the types of the operands may not be lists. + # TODO: associative addition of lists + # Associative lists are trickier, because unlike the others, + # the types of the operands may not be lists + # so e.g. list+(integer+integer) != (list+integer)+integer. if optype in ('integer', 'string'): if lnt == '+' and rnt == 'CONST' and lval['ch'][1]['nt'] == 'CONST': # (var + ct1) + ct2 -> var + (ct1 + ct2)