How to delete avery reference of an object in Python?
Posted
by Juanjo Conti
on Stack Overflow
See other posts from Stack Overflow
or by Juanjo Conti
Published on 2010-06-10T09:48:27Z
Indexed on
2010/06/10
9:52 UTC
Read the original article
Hit count: 334
python
Supose you have something like:
x = "something"
b = x
l = [b]
How can you delete the object only having one reference, say a?
del a
won't do the tric; the object is still reachable from b, for example.
© Stack Overflow or respective owner