In article <mailman.547.1251409496.2854.python-l...@python.org>, Chris Rebert <c...@rebertia.com> wrote: > >class foo: > def __init__(self, maxvalue): > self.maxvalue =3D maxvalue > self.value =3D 0 > > def put(self, value=3DNone): > self.value =3D self.value if value is None else value
Stylistic nit: I'd make that self.value = value if value is not None else self.value The reason is that the "primary" value should go first. -- Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.com/ "I support family values -- Addams family values" --www.nancybuttons.com -- http://mail.python.org/mailman/listinfo/python-list