Diving into Programming with Python I’ve spent years entertaining the thought of becoming a software developer, only to get overwhelmed by the vast array (pun intended) of programming languages to choose from. Which one should I choose, where do I begin? Java? JavaScript? C? C++? C#? Ruby? Django? Flask? Woah… wait a minute? Understanding Frameworks… Continue reading Why Start Your Programming Journey With Python?
Articles on Standard Library
Finding new and removed Python 3.11 modules in 8 lines of code
By Bob Belderbos on 9 November 2022
In our TIL Slack channel AJ shared a cool new find: Today I learned about sys.stdlib_module_names: a frozenset of strings containing the names of standard library modules. … AJ on the Pybites Slack – TIL (today-I-learned) channel So I thought to give it a little test drive, specifically checking for modules that were added and… Continue reading Finding new and removed Python 3.11 modules in 8 lines of code
Tips for clean code in Python
By Bob Belderbos on 8 November 2022
In this article I will give you 10 tips for cleaner code. Hope this helps improve your Python code. 1. Smaller units. Break long functions (methods) into multiple smaller ones that do one thing (SRP or “Single-responsibility principle”). This will make your code more modular and easier to test. For example, a function that parses… Continue reading Tips for clean code in Python
Learning Rich by making a color searcher command line app
By Bob Belderbos on 6 July 2022
The other day I wanted to get serious with the awesome Rich library. As we always say: you have to build to really learn + need ideas? Scratch your own itch. If you’re struggling for ideas, see what takes you long and/or is cumbersome and see if it’s a good candidate to automate it with… Continue reading Learning Rich by making a color searcher command line app
5 Helpful Python Decorator Use Cases
By Bob Belderbos on 3 August 2021
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
Get to Python source code instantly using importlib and inspect
By Bob Belderbos on 14 December 2020
Have you ever wondered how to get Python source code quickly? It turns out the Standard Library can do this pretty effortlessly. Here is some code to read more Python source.