A colleague of mine was shocked to learn that `del obj` doesn't actually delete the object, just the reference to it.
-
A colleague of mine was shocked to learn that `del obj` doesn't actually delete the object, just the reference to it. So if you do:
x = obj
y = obj
del xy and obj still exist with y referencing obj. x no longer exists.
-
A colleague of mine was shocked to learn that `del obj` doesn't actually delete the object, just the reference to it. So if you do:
x = obj
y = obj
del xy and obj still exist with y referencing obj. x no longer exists.
@brass75 otherwise somebody would
del 3and then where does that leave us. -
@brass75 otherwise somebody would
del 3and then where does that leave us.@stylus Down 3 in the bottom of the nth.
-
A colleague of mine was shocked to learn that `del obj` doesn't actually delete the object, just the reference to it. So if you do:
x = obj
y = obj
del xy and obj still exist with y referencing obj. x no longer exists.
@brass75 I've done my fair share wrestling the alligator that is the python garbage collector. Call my crazy, but this is why I like clear reference denotation in C.
-
A colleague of mine was shocked to learn that `del obj` doesn't actually delete the object, just the reference to it. So if you do:
x = obj
y = obj
del xy and obj still exist with y referencing obj. x no longer exists.
What did your colleague think `y` would be after deleting x?
-
R relay@relay.publicsquare.global shared this topicR relay@relay.mycrowd.ca shared this topic