wren
wren copied to clipboard
String inside a sequence is quoted in toString method.
test.wren
var list = [42, 12, "42, 12", false, "false"]
System.print(list)
var map = {12: "List", "12": List}
System.print(map)
Before
[42, 12, 42, 12, false, false]
{12: List, 12: List}
After
[42, 12, "42, 12", false, "false"]
{12: "List", "12": List}
For the content of this patch I have some concerns, as it tries to do an equivalent of python repr. Implementation wise, I would have preferred a String.quote, and make it part of join instead. But even with that In place I'm still wondering.
My thumbs up was for the functionality itself. I think this improves the readability. The implementation could likely be improved further, agreed.