Defining custom containers#

Learning Objectives#

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

  • Define NamedTuples

  • Define dataclasses

  • Explain why sometimes custom classes can be better than dictionaries for storing your some data.

Materials#

Download the slides.

Video on the topic by Raymond Hettinger.

Quiz#