Yes, you have created a circular link; the list object is referenced by itself. This means that the link counter is incremented by 1 additional link.
The Python garbage collector will handle this case; if nothing else refers to the list object, the garbage collector process is responsible for breaking this circle:
>>> import gc
>>> some_list = []
>>> gc.get_referents(some_list)
[]
>>> some_list.append(some_list)
>>> some_list[0] is some_list
True
>>> gc.get_referents(some_list)
[[[...]]]
source
share