godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
90.83k stars 21.13k forks source link

weird output when printing empty Array #40479

Open Wafflily opened 4 years ago

Wafflily commented 4 years ago

Godot version: 3.2.1

OS/device including version: Windows 7 64 bits

Issue description: Code:

var test = [] for i in range(2) : test.append([]) print(test)

Expected:

[[], []]

Output:

[[], [...]]

Steps to reproduce: Just copy the code in any node.

me2beats commented 4 years ago

maybe this is a feature of displaying the value of empty nested arrays in the godot output console (?). The array itself works correctly, doesn't it?

printt(test[0],test[1])

this prints [] []

Wafflily commented 4 years ago

Whether this is intentional or not, it needs correcting. There is no benefit to the current output.

Zylann commented 3 years ago

Just hit this too in 3.2.3. Got me very confused, as debugging a plugin heavily relies on printing things out.

    var lol = [[], []]
    print(lol)

Gives

[[], [...]]

And it's the same in the command line debugger.

arkology commented 4 days ago

Just tested with 3.6 and 4.4dev3 with code snippets from GH issue. Looks like it was fixed and issue could be closed. CC @akien-mga , @Calinou