Looking for a list subclassing example...

Shagshag13 shagshag13 at yahoo.fr
Tue Jun 4 13:01:14 CEST 2002


Is is possible to write a method in an object subclassing from list and which "frees" it ?

reset doesn't work

> class Shag(list):
>  def __init__(self, emptyValue = None):
>   self._emptyValue = emptyValue
>
>  def reset(self):
>   del self
>   self = []

thanks,

s13.





More information about the Python-list mailing list