Looking for a list subclassing example...

Jeff Epler jepler at unpythonic.net
Tue Jun 4 15:57:52 CEST 2002


On Tue, Jun 04, 2002 at 01:01:14PM +0200, Shagshag13 wrote:
> Is is possible to write a method in an object subclassing from list and which "frees" it ?

You could 'del self[:]' (slice deletion) to remove all the entries from self.

Jeff





More information about the Python-list mailing list