In this talk, Rodrigo shows what idiomatic Python code looks like and illustrates how the subjective notion of “beautiful”, or “elegant” code, can make your code objectively better, regardless of your Python skill level. That is done by visiting several vanilla Python features that people sometimes forget to learn, as they rush to import all the shiny modules and frameworks they really want to use. In order to achieve this, we go through the learning journey of a hypothetical Pythonista that wanted to implement enumerate from scratch. We will start with a first version written by them and then refactor it incrementally through the use of Pythonic idioms and patterns.
The talk will build around a series of articles available online (at https://mathspp.com/blog/pydonts), where Rodrigo explores all the vanilla Python features that make Python one of the most interesting programming languages to learn.
There are no prerequisites for this talk, and both advanced users and beginners alike can benefit from it. After the talk, you will have a better understanding of several concepts such as iterables and (infinite!) lazy generators, and you will know how to use them effectively to get the job done.