How I patched Python to include this great Ruby feature

Ruby, unlike Python, makes lots of things implicit, and there’s a special kind of if expression that demonstrates this well. It’s often referred to as an “inline-if” or “conditional modifier”, and this special syntax is able to return one value when a con… Read more

Similar

Laziness in Python

Laziness is a virtue - well, in programming anyway! Professor Thorsten Altenkirch on how you can use the 'yield' to compute certain things "on demand" To Inf... (more…)

Read more »

Subclassing in Python, Redux

The conflict between subclassing and composition is as old as object-oriented programming. The latest crop of languages like Go or Rust prove that you don’t need subclassing to successfully write code. But what’s a pragmatic approach to subclassing in Pyt... (more…)

Read more »