Re: list extension ?



On 30 juin, 21:05, Stef Mientki <stef.mien...@xxxxxxxxx> wrote:
thanks guys,

def __init__ ( self, value = [] ) :

Gotcha : default argument values are eval'd only once. Also, it would
make more sense IMHO to follow the parent's class initializer's
behaviour:

Ah hem.... Sorry, should have double-checked:

def __init__(self, *args)

list.__init__ ( self, value )

list.__init__(self, *args)

that's even better, except the call must be
list.__init__ ( self, args )

Indeed. Which makes my whole comment about "following parent's class
behaviour" totally off-tracks. Should have shut up here :(


.