From a6127cf144a511ca9fd08b4d107a14923acdb3aa Mon Sep 17 00:00:00 2001 From: Sei Lisa Date: Wed, 4 Mar 2015 00:40:07 +0100 Subject: [PATCH] lazylistcompat idea ditched. --- lslopt/lslparse.py | 8 ++++++++ main.py | 8 ++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/lslopt/lslparse.py b/lslopt/lslparse.py index 8e1923f..09a73da 100644 --- a/lslopt/lslparse.py +++ b/lslopt/lslparse.py @@ -1877,6 +1877,14 @@ class parser(object): # Allow brackets for assignment of list elements e.g. mylist[5]=4 self.lazylists = 'lazylists' in options + # This was once an idea, but it has been discarded because + # llListReplaceList requires the argument to be evaluated twice, + # so the function is unavoidable. Consider e.g. L[x++] = 3 expanded to + # L = llListReplaceList(L, [3], x++, x++). + # # Extend the list with integer zeros when lazylists is active and the + # # index is greater than the end of the list. + # self.lazylistcompat = 'lazylistcompat' in options + # TODO: Enable break/continue #self.breakcont = 'breakcont' in options diff --git a/main.py b/main.py index 17567e2..7d9cdda 100755 --- a/main.py +++ b/main.py @@ -62,8 +62,12 @@ Options (+ means active by default, - means inactive by default): hard to debug, but this gets big savings for complex scripts. lazylists - Support syntax like mylist[index] = 5; rather than using - llListReplaceList. Not recommended, as it adds a new - function. + llListReplaceList. Only assignment supported. The list + is extended when the argument is greater than the list + length, by inserting integer zeros. This is implemented + for compatibility with Firestorm, but its use is not + recommended, as it adds a new function, wasting memory + against the very spirit of this program. ''' % sys.argv[0]) return 1