> Hello,
> I got this similar  sample script from books:
> $ cat sampdict.py
>  #!/usr/bin/python
> class  SampDict(dict):
> def __init__(self,  filename=None):
> self["name"] =  filename


> Are you sure you copied it exactly as it  appears? Where did you find it?
 

Thank you for the help,Gabriel.
The codes got by me from the book of "Dive into  Python".The original codes 
are  below:
 
class  FileInfo(dict):                  
"store file  metadata"
def __init__(self, filename=None): 
self["name"] = filename

It's in the chapter 5.5.

 


-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to