Pop a list from beginning ? and memory saving...

Shagshag13 shagshag13 at yahoo.fr
Tue Jun 4 03:57:24 EDT 2002


> - use "del var" instead of "= None".

see the "reset" method below, if is a good way to free memory ???
or is there a better way/tips ?

class Shag:
 def __init__(self, v = []):
  self._v = v

 def __str__(self):
  return str(self._v)

 def reset(self):
  del self._v
  self._v = []

thanks,

s13.





More information about the Python-list mailing list