-
Don't crash on printing nested types · 8b1e297fHein-Pieter van Braam-Stewart authored
When adding an Array or Dictionary to itself operator String() got in an infinite loop. This commit adds a stack to operator String() (Through the use of a new 'stringify method'). This stack keeps track of all unique Arrays and Dictionaries it has seen. When a duplicate is found only a static string is printed '[...]' or '{...}'. This mirror Python's behavior in a similar case.
8b1e297f
×