Recently I saw a piece of code that I can't understand. Here's the example:
a = {}
a['value'] = a
print(a)
>>>> {'value': {...}}
As a result, this creates an infinite number of copies of the initial dict, someting like:
{
'value': {
'value': {
'value': {
...
}
}
}
}
So, why is this happening? Is this some kind of recursive thing?