type() vs. isinstance()
What's the difference between type() and isinstance() methods, and which one is better for checking the type of an object?
I write about Python, productivity for developers (dotfiles, CLI tools, etc.), micro-entrepreneurship (i.e. side projects that I built), and whatever else interested me at this time.
What's the difference between type() and isinstance() methods, and which one is better for checking the type of an object?
Why iterating over the whole list is a bad idea, what data structure is best for membership testing, and when it makes sense to use it?
How can we compare a variable to True or False, what's the difference between "is" and "==" operators, and what are truthy values?
What's the fastest way to sort a list? When can you use sort() and when you need to use sorted() instead?
Simple "for loops" can be replaced with a list comprehension. But is it going to make our code faster? And what limitations list comprehension has?
Dictionaries in the latest Python versions preserve the insertion order. So, is there any reason to use the OrderedDict as we used to do in the past?
Numba library has plenty of tools to speed up your mathematical-heavy programs. From a simple @jit decorator, all the way to running your code on a CUDA GPU.
How to quickly find something in a collection of items, like a list or a range? When a generator expression is a great solution, and when it's not?
Is it faster to "ask for forgiveness" or "look before you leap" in Python? And when it's better to use one over the other?
Introduction to the "Writing Faster Python" series. What it is about, how do I benchmark, frequently asked questions, and additional resources.
How a 5-minute hack for %reload function turned into a rabbit hole of different Python tools and techniques.
26 CLI tools that I love. And one that is OK.
List of my favorite VS Code plugins that helps me build Python application.
I'm programming on a Macbook, and I love it. Here are some of the tools that make my life easier.
Tips and tricks on how to use IPython as your debugger.