Always Use sets!
Andy P Fundinger (~Ciemaar) |
2
Description:
sets are a secret weapon in Python. Perhaps even more important than the fact that Python sets are highly performant, they also add to our codebase's clarity by showing exactly what we mean in our code. In this talk, I will introduce sets and their many built-in features and will also demonstrate how they make code clearer. I'll also use a series of microbenchmarks to show the performance benefits of this approach and will delve slightly into the implementation to show why that benefit is to be expected.
Once we've looked at some "normal" uses for sets, we'll continue to explore some cases where sets are less obvious as the right approach, such as using sets to replace queues, dictionaries, ordered lists, and more. For these uses cases, we'll explore the tipping point between the efficiencies of sets and data structures that may be more directly suitable.
Prerequisites:
Basic Python Syntax and data structures, tuples, lists, and dicts
Video URL:
https://youtu.be/S7tLhIJZKxA?si=FS3Lc8nVUhZUO9I9&t=138
Speaker Info:
Andy Fundinger is a senior engineer at Bloomberg, where he develops Python applications in the Data Gateway Platform team and supports Python developers throughout the firm through the company's Python Guild. Andy has spoken several times at PyGotham, as well as other conferences such as QCon, PyCaribbean, and EuroPython.
In the past, Andy has worked on private equity and credit risk applications, web services, and virtual worlds. Andy holds a master's degree in engineering from Stevens Institute of Technology.
Speaker Links:
https://pyvideo.org/speaker/andy-fundinger.html