[EMAIL PROTECTED] writes: > 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
You've put the lines of code in your message without indentation. Please remember that Python uses indentation syntactically. If you're showing code examples in your message, you must make sure that the indentation survives correctly. The best way to do that is to use only tabs, *or* only spaces, for indentation; many programs will mangle tabs in different ways, so spaces are usually safest. -- \ "My aunt gave me a walkie-talkie for my birthday. She says if | `\ I'm good, she'll give me the other one next year." -- Steven | _o__) Wright | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list