Peter Otten wrote:

uhhmm.. I think I misread the example

>>>> d = {}
>>>> d.setdefault(1, 2)
> 2
>>>> d
> {1: 2}
>>>> d.setdefault(1, 3)
> 2
>>>> d
> {1: 2}

yeah, sure it can be useful for the OP...

-- 
ZeD

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

Reply via email to