Skip to content

language

#202: Rounding in Python

Python is usually a straightforward language without surprises. However, when you use the round() function you may run into some strange behaviour. Let us have a look at the specialities of round() and what is going on.

#201: How Much Cost a Print()?

A few weeks back we were running a data preparation script that took a long time to complete. The main part of the work should not take that much time, but somehow that script was sloooow. I expected that the print() statement for each record would have an impact on performance, but I had no indication of the magnitude. Is it significant? Or is it neglectable? Let us find out how big the impact can be.

#133: Minimalistic DTOs in Python

I needed to return multiple values from a function. While Python allows that with tuples, it is a lot of magic involved and the meaning in the order of values in the tuple is nowhere written down. Is there a better way to create a data transfer object without much effort? Let's find out.

#105: Multiply Strings in Python

While working through a Pluralsight course I noticed a strange looking command that seams to make no sense: '-' * 100. As it turns out, we can multiply strings in Python and this provides some nice amenities for our cli applications.