Re: [Tutor] forcing the None values of a dictionary

2012-10-03 Thread bob gailer
On 10/3/2012 3:59 PM, Brannon, Terrence wrote: I'm wondering if there is something I overlooked for this function I wrote... and also whether it could've been done destrictively instead of returning a new dictionary: I don't understand your question. Could you clarify? What does "destrict

Re: [Tutor] forcing the None values of a dictionary

2012-10-03 Thread Dave Angel
On 10/03/2012 03:59 PM, Brannon, Terrence wrote: > I'm wondering if there is something I overlooked for this function I wrote... > and also whether it could've been done destrictively instead of returning a > new dictionary: > > def dictNoneValueTo(d, new_value=''): > """force None values in

[Tutor] forcing the None values of a dictionary

2012-10-03 Thread Brannon, Terrence
I'm wondering if there is something I overlooked for this function I wrote... and also whether it could've been done destrictively instead of returning a new dictionary: def dictNoneValueTo(d, new_value=''): """force None values in a dictionary to a default value""" for k in d: i