When to use custom containers?

When to use custom containers?#

Learning Objectives#

After working through this topic, you should be able to:

  • Decide when to use dicts, datclasses and NamedTuples

Materials#

These are the slides.

Quiz#

What is the main factor in deciding between dicts, dataclasses and NamedTuple
Which data structures are a good choice if you have fixed fields
Which data structures are immutable by default