Some time ago I asked on Twitter: I was curious what you use #Python decorators for? And I got quite an amazing / insightful response: The obvious next step for me was to look at some examples / use cases. So below are 5 useful applications of decorators. Study them, then apply similar things to… Continue reading 5 Helpful Python Decorator Use Cases
Articles on Concepts
Naughts and Crosses Gets a Little Help
By Geoff Riley on 12 March 2021
Naughts and Crosses (Tic-Tac-Toe to some audiences) is a popular skill game often played by children. It can also be usefully employed to distract dial up computers, at NORAD for example, rather than allowing the ‘playing’ of Global Thermonuclear War. Would you like to play a game?
Abstract Syntax Trees in Python
By Alessandro Finamore on 20 February 2021
In this article Alessandro provides an overview of Abstract Syntax Trees (ASTs), introduces a few use-cases, and showcases the ast module in the Python Standard Library. The content is structured in a top-down fashion, starting from general notion about an AST, and digging deeper up to the point of artificially manipulating an AST to “randomize” the content of some instructions.
Mutable vs Immutable Data Types in Python
By Bob Belderbos on 27 April 2020
Knowing the difference between mutable and immutable types in Python is important. In this article I will give you some practical examples of both and show you some of the advantages of using immutable types. We even look at JS / React / functional programming a bit towards the end.
Exploring the Modern Python Command-Line Interface
By Erik O'Shaughnessy on 27 April 2020
Delve into the why and the how of writing command-line tools using Python.
When to Write Classes in Python And Why it Matters
By Bob Belderbos on 25 April 2020
When people come to Python one of the things they struggle with is OOP (Object Oriented Programming). Not so much the syntax of classes, but more when and when not to use them. If that’s you, read on. In this article I will give you some insights that will get you clarity on this.
4 Common Mistakes When Learning Python and Programming
By Bob Belderbos on 19 March 2020
How are you progressing with your Python? What could be holding you back? I gave it some thought and identified 4 issues we commonly see that hold people back from becoming a proficient Pythonista and programmer.
Introduction to Python Functions
By Julian Sequeira on 11 February 2020
In this article I’m going to break down what a function is and how you can use them to be a better coder.
Under the Hood: Python Comparison Breakdown
By AJ Kerrigan on 27 October 2019
Use Python’s “dis” module to see how Python evaluates two similar comparison operations.
Linting with Flake8
By Julian Sequeira on 8 October 2019
What the heck is linting? Let’s dive into the concept and talk about how flake8 can help us make our code better.