Skip to content
loading...

re: [Python-Ideas] Link: Bidirectional Aliasing in Python VIEW POST

TOP OF THREAD FULL DISCUSSION
re: I think in all of those, except maybe the "simplify aliasing" example, '=' does more correct thing than your linking. And it is already supported i...
 

I could not agree more with you. Anyway, I added more clarification with examples here. After go thru that, if you still think that is the case. Then, I think it is actually the case.

 

Yup, mostly (multilingual coding is an exception, but I strongly believe this is better handled through external tools, not Python language itself). The ones when I don't are the ones where even the link wouldn't help you. For example, you seem to think that "freeing the memory" for an object happens immediately after you del all the names for it.

First, it doesn't have to be, and second, even if it did, it still wouldn't help you much because you can't know, especially with complex frameworks like jupyter, who else "up the chain" and in what place holds a reference to your object. If you really want to explore such ideas, weakref (which is built specifically for that) might be much better choice.

code of conduct - report abuse