Pydon'ts

Write Elegant Python Code

Rodrigo Girão Serrão

Abstractions Best Practice Clean Code Python Skills Python general

See in schedule: Wed, Jul 28, 14:15-15:00 CEST (45 min)

EDIT: Talk slides available at https://github.com/mathspp/talks; you can reach out to me with comments/questions on Twitter @mathsppblog or through email at rodrigo at mathspp dot com.

---

In this talk I show what idiomatic Python code looks like and illustrate how the subjective notion of “beautiful”, or “elegant” code, can make your code objectively better, regardless of your Python skill level.

We do that by visiting several vanilla Python features that people sometimes forget to learn, as they rush to importing 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, taking a function written by them and refactoring it incrementally through the use of Pythonic idioms and patterns.

The whole talk will build around a weekly series of articles I have been publishing (at https://mathspp.com/blog/pydonts), where I explore 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 can benefit from it.

Type: Talk (45 mins); Python level: Beginner; Domain level: Beginner


Rodrigo Girão Serrão

Rodrigo has always been fascinated by problem solving and that is why he picked up programming – so that he could solve more problems.
He also loves sharing knowledge, and that is why he spends so much time writing articles @ https://mathspp.com, giving workshops and courses, and writing books.

His main areas of scientific interest are mathematics (numerical analysis in particular) and programming in general (with a preference for the Python and APL languages), but Rodrigo also enjoys reading fantasy books, watching silly comedy movies and eating chocolate.