a clean way to define dictionary

Skip Montanaro skip at pobox.com
Wed Jun 18 12:18:55 EDT 2003


    >> In 2.3, you can express this as dict(foo=1, bar='sean') without a
    >> need to define a function for the purpose.

    Alexander> Yuck! This seems like a really bad idea to me. This
    Alexander> effectively makes it impossible to specify any options (such
    Alexander> as initial size, default value etc.)  

I don't see that the behavior of dict() affects your ability to define the
behavior of a subclass.

Skip





More information about the Python-list mailing list