I'm reading the book of "Dive into Python" and got these code pieces:
 
class  UserDict:                                 
def __init__(self,  dict=None):              self.data = {} 
if dict is not None: self.update(dict)
 
My question is,for the statement of:
 
if dict is not None: self.update(dict)
 
Why it's not this one below?
 
if dict is not None: self.data.update(dict)
 
Thanks.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to