Does this code create a circular reference ?
Darrell
news at dorb.com
Tue Nov 30 17:15:15 EST 1999
After a closer look, No it doesn't create a circular reference.
If the "headache" class had kept a reference to a_child it would have.
def eater():
l1=[]
l2=[]
l1.append(l2)
l2.append(l1)
for y in range(50000):
eater()
Now that's a circular reference.
--
--Darrell
"Ionel Simionescu" <ionel at psy.uva.nl> wrote in message >
I need advice on whether the situation described below introduces circular
> references.
>
More information about the Python-list
mailing list