[Tutor] __init__, default values and dict's

ALAN GAULD alan.gauld at btinternet.com
Thu Aug 14 22:37:47 CEST 2008


> def __init__(self, d=None):
>   if not d:
> 
> I would use
>   if d is None:
> so the user can explicitly pass e.g. an empty dict.

Good catch. I agree.

Alan G.



More information about the Tutor mailing list