Re: Using default a empty dictionary as a default value

2005-03-22 Thread Peter Hansen
C Gillespie wrote: Dear All, I ran my code through pylint to clean it up and one of the (many) errors it through up was Dangerous default value {} as argument Bascially, I have: class NewClass: def __init__(self, myDict={}): for key, value in myDict: print key, value Obviou

Re: Using default a empty dictionary as a default value

2005-03-22 Thread SER.RI-TIC-Alexis Roda
C Gillespie wrote: Dear All, I ran my code through pylint to clean it up and one of the (many) errors it through up was Dangerous default value {} as argument Bascially, I have: class NewClass: def __init__(self, myDict={}): for key, value in myDict: print key, value Obviou

Re: Using default a empty dictionary as a default value

2005-03-22 Thread Diez B. Roggisch
C Gillespie wrote: > Dear All, > I ran my code through pylint to clean it up and one of the (many) errors > it through up was > Dangerous default value {} as argument > Bascially, I have: > > class NewClass: > def __init__(self, myDict={}): > for key, value in myDict: > p

Using default a empty dictionary as a default value

2005-03-22 Thread C Gillespie
Dear All, I ran my code through pylint to clean it up and one of the (many) errors it through up was Dangerous default value {} as argument Bascially, I have: class NewClass: def __init__(self, myDict={}): for key, value in myDict: print key, value Obviously, this is not