gpython
gpython copied to clipboard
Recursive printing of REPR List, Dictionary, Tuple
Expected:
Gpython 3.4.0
>>> a = [1,2,3]
>>> a[0] = a
>>> a
[[...], 2, 3]
Actual behavior:
Gpython 3.4.0
>>> a = [1,2,3]
>>> a[0] = a
>>> a
runtime: goroutine stack exceeds 1000000000-byte limit
fatal error: stack overflow
Yes that needs fixing :-)
Want to have a go at fixing it? It probably needs repr to keep a map of visited items
That's right approach. AFAIK, some more C API should be implemented which are related to repr_enter and repr_left :)
@ncw Anyway, I will take a look this issue. :)