If you’ve ever implemented a class-based iterator from scratch in Python, you know that this endeavour requires writing quite a bit of boilerplate code. And yet, iterators are so useful Continue ReadingWhat Are Python Generators?
By Dan Bader — Get free updates of new posts here. Generator expressions are a high-performance, memory–efficient generalization of list comprehensions and generators. In this tutorial you’ll learn how to Continue ReadingGenerator Expressions in Python: An Introduction
An end-to-end tutorial of how to extend your Python programs with libraries written in C, using the built-in “ctypes” module. The built-in ctypes module is a powerful feature in Python, Continue ReadingExtending Python With C Libraries and the “ctypes” Module
By Dan Bader — Get free updates of new posts here. Here’s another great feature of iterators in Python: By chaining together multiple iterators you can write highly efficient data Continue ReadingIterator Chains as Pythonic Data Processing Pipelines
Contributing to open-source projects is a great way to build your programming skills, take part in the community, and to make a real impact with your code… It can also Continue ReadingContributing to Python Open-Source Projects
By Dan Bader — Get free updates of new posts here. Learn a simple trick for keeping your Python code organized and maintainable—even as a project grows over time. How Continue ReadingHow to Structure Your Python Programs
I got this email with Python career questions from newsletter reader Brad: First, with regards to your Python Tricks book, I thought it was well-written and well-priced. I got good Continue ReadingGetting a Job as a Self-Taught Python Developer
Learn how to create your own Domain Specific Language with Python from scratch with this step-by-step tutorial. A Domain Specific Language, or DSL for short, is a language that’s specialized Continue ReadingWriting a Domain Specific Language (DSL) in Python
Basically, parallel computing allows you to carry out many calculations at the same time, thus reducing the amount of time it takes to run your program to completion. I know, Continue ReadingPython Parallel Computing (in 60 Seconds or less)
By Dan Bader — Get free updates of new posts here. It’s finally here! I’m super excited to announce the release of my book “Python Tricks: A Buffet of Awesome Continue ReadingAnnouncing Python Tricks: The Book!
By Dan Bader — Get free updates of new posts here. I’m getting a ton of emails, Tweets, and YouTube comments from people with questions about my new book. Here’s Continue ReadingPython Tricks: The Book Launch FAQ
Learn advanced patterns for interfacing Python with native libraries, like dealing with C structs from Python and pass-by-value versus pass-by-reference semantics. The built-in ctypes module is a powerful feature in Continue ReadingInterfacing Python and C: Advanced “ctypes” Features
I got this question from a newsletter reader who’s an entry-level Pythonista: What’s the best way of moving from a basic understanding of Python to working on real projects? And Continue ReadingFinding Python Projects to Grow Your Programming Skills
By Dan Bader — Get free updates of new posts here. Speed up your Python programs with a powerful, yet convenient, caching technique called “memoization.” In this article, I’m going Continue ReadingMemoization in Python: How to Cache Function Results
By Dan Bader — Get free updates of new posts here. Mobile application development on Android and iOS wasn’t Python’s strong suit in the past—but things might be changing… What Continue ReadingUsing Python for Mobile Development: Kivy vs BeeWare