When it comes to variables, Python has a well-known search strategy, known by the acronym “LEGB.” Whenever you mention a variable — and by “variable,” I mean a name that could be referencing data, a function, or a class — Python tries to find it in four different places: The local (function) scope, the enclosing…
I’ve found that many Python developers are confused by object-oriented programming in the language: Newcomers to programming are confused by object-oriented ideas and terminology, while Veteran programmers are surprised and confused by how Python objects work No matter which camp you’re in, I have good news for you: Weekly Python Exercise will be starting a…
Want to improve your Python fluency? There’s no better way than doing exercises, practicing your Python skills and ensuring you understand how to solve problems in the best possible way. My book, “Python Workout,” not only contains 50 of my favorite exercises from my Python training business (at some of the world’s best-known companies), but…
The biggest problem with software today isn’t writing code. It’s maintaining — debugging, improving, and expanding — existing code. It’s hard to maintain someone else’s code. Heck, it’s even hard to maintain your own code. (Who among us hasn’t looked at code and said, “Who was the idiot who wrote this… oh, it was me…”?)…
I’m delighted to announce that Weekly Python Exercise is a gold sponsor of PyCon 2020, to be held in Pittsburgh, Pennsylvania. PyCon is the largest Python conference in the world, and is both fun and interesting for Python developers of all experience levels and backgrounds. This will be the second year in a row sponsoring…
If you’ve been programming in Python for any length of time, then you’ve undoubtedly heard that “everything is an object.” But what does that mean? And who cares? And what effect does that have on you as a developer — or on Python, as a language? Indeed, how can (and should) you take advantage of…
About a month ago, I started my “Python standard library video explainer series” on YouTube. My goal is to walk through the Python standard library, one little bit at a time — explaining it to Python developers, and also discovering (for myself) the many gems that exist in there, but which I’ve never had a…
I’ve attended two Python conferences so far this year: PyCon (in May, in Cleveland, Ohio) and EuroPython (in July, in Basel, Switzerland). Both were fantastic; I was happy to be a sponsor at PyCon in the US, and to give my “practical decorators” talk at both conferences. While in Basel, I heard about PyCon Africa,…
Today (Sunday, July 14th) is my birthday. And as happens every year, I’m celebrating with huge discounts on all of my online courses and books. I’m now 49, so you can get 49% off of anything in my online store. But as with birthdays, this massive sale won’t last long — it ends Monday evening.…
If you’ve been using Python for at least six months, but still find yourself searching on Stack Overflow and Google for answers to your problems — you’re not alone. The good news is that the solution to your problem, to greater Python fluency, is easy: Practice, practice, and more practice. My new advanced-level cohort of…