Peter Otten wrote:

> I would be surprised by the behaviour of Andrew's variant:
>
>>>> def append(item, items=None):
> ...     items = items or []
> ...     items.append(item)
> ...     return items
> ...
>>>> a = []
>>>> append("x", a)
> ['x']

ah that's a good point.  andrew





--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to