<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=US-ASCII">
<META content="MSHTML 6.00.2900.3020" name=GENERATOR></HEAD>
<BODY id=role_body style="FONT-SIZE: 10pt; COLOR: #000000; FONT-FAMILY: Arial"
bottomMargin=7 leftMargin=7 topMargin=7 rightMargin=7><FONT id=role_document
face=Arial color=#000000 size=2>
<DIV><FONT style="BACKGROUND-COLOR: transparent" face=Arial color=#000000
size=2>
<DIV><BR><BR>[quote]The idea behind that class is to act "as-if" it were a real
dictionary. <BR>Dicts have an update method, and UserDict should too. But
it's not listed <BR>in the book (should appear a few lines below that
code); this is a <BR>possible implementation:<BR><BR>def update(self,
other):<BR> for key in other.keys():<BR>
self.data[key] = other[key]<BR><BR>Given this method, __init__
works fine.<BR>Using self.data.update(dict) is OK if the dict argument is a
real <BR>dictionary, but not if it's another UserDict.[/quote]</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>Thank you.</DIV>
<DIV>But I'm still confused that what's the "real dictionary"?I can't know
this point.Please help and thanks
again.<BR></DIV></FONT></DIV></FONT></BODY></HTML>