conferences | speakers | series

Duck Typing, Metaclasses, & Recursion: Building a Generalized Deep Collection Type

home

Duck Typing, Metaclasses, & Recursion: Building a Generalized Deep Collection Type
PyTexas 2023

Quickly groking and working with deeply nested collections like combinations of dicts and lists (and sometimes other types too) is a common problem, whether it's trying to understand a data set, an API response, or detailed instructions or results from infrastructure as code. Let's talk about current solutions to the problem, their limitations, and how to make that all even easier. Let's talk about making a DeepCollection that can handle anything.

This talk will cover the motivation for a new library, Deep Collections, and some interesting and fun parts of its construction. There are several prior art libraries available, from dpath and Dotty-Dict, to the more recent python-benedict. Motivation for Deep Collections will include a brief discussion of the evolution of the prior art as well as their current limitations. Then we'll discuss how those limitations can be overcome generally, and how to implement some of the more fun and foundational portions of the Deep Collections code to do it.

Speakers: Joseph Nix