Trying to understand a very simple class - from the book "dive into python"

Chris Rebert clp2 at rebertia.com
Wed May 20 12:48:43 EDT 2009


On Wed, May 20, 2009 at 9:10 AM, walterbyrd <walterbyrd at iname.com> wrote:
> On May 20, 9:59 am, Marco Mariani <ma... at sferacarta.com> wrote:
>
>> Do you know what a dictionary is?
>
> Yes, but I thought  a dictionary used curly brackets. Is the object a
> dictionary?

Indeed. Note how you're subclassing `UserDict` (its name is similar to
`dict` for a reason).
See the UserDict docs for more info:
http://docs.python.org/library/userdict.html

Cheers,
Chris
-- 
http://blog.rebertia.com



More information about the Python-list mailing list