[Tutor] Re: special call for deleted objects?

Thomas Clive Richards thomi at imail.net.nz
Fri Jan 30 17:24:22 EST 2004


On Saturday 31 January 2004 01:46, Abel Daniel wrote:
>
> How are you going to replace them?
>
> >>> a=5
> >>> b=a
> >>> a=6
> >>> b
>
> 5
>
> Assigning to a didn't change b.


well.. sort of like this:

a = []
for i in range(50):
	a.append(SomeClass())

a[5] = None		#<---right here...


But it's OK now, I'm calling my own cleanup method right before I insert a 
none into the list...


THanks all the same ;)


-- 

Thomi Richards,
thomi at once.net.nz




More information about the Tutor mailing list