In article <[email protected]>,
Chris Rebert <[email protected]> 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 ([email protected]) <*> http://www.pythoncraft.com/
"I support family values -- Addams family values" --www.nancybuttons.com
--
http://mail.python.org/mailman/listinfo/python-list