Imagine a hypothetical situation where a function returns two values: a huge dataset you are not interested in and a small summary you want. If your script (not interactive shell) has code like
_, the_answer = deep_thought.ask(the_ultimate_question)
, will the garbage collector treat _
any different than any other name and free memory any quicker than with
mostly_harmless, the_answer = deep_thought.ask(the_ultimate_question)
assuming mostly_harmless
will never by used. At first I assumed it wouldn't but after reading this: python garbage collection and _ underscore in interpreter environment I started having doubts. I hope someone here will know the answer or find it quicker than me.
Also, for bonus points, how does it compare performance-wise with
the_answer = deep_thought.ask(the_ultimate_question)[1]
?