Amador Pahim

Category: Python

For Better Exit Codes

It’s the SRE mantra: Automate Yourself Out of a Job. And by doing that, we build up, step by step, an automation infrastructure with multiple pieces of software that have to talk to each other. Regardless where those applications will be executed on, the exit code might be the only clue we have to figure […]

Multiple Inheritance and Linearization

What does super() do? Really, answer that in your mind, we will get back to it. It is a well known problem: a class A implements a method foo(). Two classes B and C both inherit from A and both override the method foo(). A new class D inherits from both B and C. When […]

Class Attribute Resolution

Have you ever heard about “data descriptors”? No? One more reason to stick around. Some time ago I was reading the official Python documentation and it was quite hard for me to figure out the full order of the class attribute resolution from there. That’s when I decided to write it down here, hopefully in […]

The Price of Code Golf

I still remember the feeeling. Years ago, like, many years ago, I was sitting at a Free Software conference, watching this presentation “Shell Script OneLiners” (or something like that). The whole thing was around command line sorcery and the magic things we can achieve with one line of Shell script. – “Two lines?! Why so […]

Back to top