bruno at modulix wrote: > Another solution to this is the use of a 'marker' object and identity test: > > _marker = [] > class A(object): > def __init__(self, n): > self.data =n > def f(self, x = _marker): > if x is _marker: > x = self.data > print x
I'll add my 2 cents to the mix: default = object() class A(object): def __init__(self, n): self.data = n def f(self, x=default): if x is default: x = self.data print x -- Benji York -- http://mail.python.org/mailman/listinfo/python-list