Extracting elements over multiple lists?

Chris Angelico rosuav at gmail.com
Tue Nov 15 14:53:26 EST 2011


On Wed, Nov 16, 2011 at 5:17 AM, Dave Angel <d at davea.name> wrote:
> a = someexpression...
> b = a
> ....
> del a
>
> Does not (necessarily) delete the object that a refers to.  It merely
> deletes the symbol a.

I'd have to classify that as part of the change of thinking necessary
for a refcounted language, and not specific to del at all. The del
statement is identical to "a = None" in terms of deleting objects;
someone who's come from C++ might want to explicitly del every
variable before returning, but that's the only way that it's tied to
'del'.

ChrisA



More information about the Python-list mailing list