List + list prints differently in GS 2.0 vs 2.1 VPython
Closed this issue · 1 comments
wigie commented
GlowScript 2.1 VPython
# Minimal oddly-working program
a = [1, "2"] + ["three", 4]
print(a) # '[1, 2three4]', weird in GS 2.1
print(str(a)) # '[1,"2","three",4]', normal
# EOF
Naively, I'd expect the two print statements to produce similar output, and in GS 2.0, they actually do. In both GS 2.0 and 2.1, the concatenated list otherwise seems to behave like a list (type(a) = 'object', has length 4, etc.).
BruceSherwood commented
Thanks much. Fixed.