From aa74e6ed64146ba46fd1be54f22c411a085473cd Mon Sep 17 00:00:00 2001 From: Sei Lisa Date: Fri, 4 Sep 2015 05:46:18 +0200 Subject: [PATCH] Sadly, Python can't represent -nan, even though llList2CSV can display it. Add a note to that effect. --- lslopt/lslbasefuncs.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lslopt/lslbasefuncs.py b/lslopt/lslbasefuncs.py index f798af2..ec7bd10 100644 --- a/lslopt/lslbasefuncs.py +++ b/lslopt/lslbasefuncs.py @@ -974,6 +974,8 @@ def llIntegerToBase64(x): return b64encode(chr((x>>24)&255) + chr((x>>16)&255) + chr((x>>8)&255) + chr(x&255)).decode('utf8') def llList2CSV(lst): + # INCOMPATIBILITY NOTE: In LSL, llList2CSV can return "-nan". Python can't. + # In Python there's no distinction between -nan and nan. assert islist(lst) ret = [] for elem in lst: