Blog
Python PEP 668 - working with "externally managed environment"
Python Linux users would have noticed that python is now an "externally managed environment" on newer releases of most OS. That is indeed the case for Debian 10/Bookworm and thus …
Topic
15 matching pages
Blog
Python Linux users would have noticed that python is now an "externally managed environment" on newer releases of most OS. That is indeed the case for Debian 10/Bookworm and thus …
Blog
I hate repeating myself. It's boring. Life is too short. Like any self respecting hacker I will go out of my way to avoid it, even when I suspect it would cost me more to automate …
Blog
A few weeks ago I talked with a friend studying computer science who I discovered had never experienced the joy of programming with a high level language. Not only that but he …
Blog
When I was developing Cloudtask, I discovered none of the interfaces in the Python multiprocessing module were powerful enough for my needs so I had to roll my own. The result is …
Blog
Methodology The basic methodology for optimization: Discover where you program is spending its time (hotspots vs coolspots) A good way to get an overview is to use the Python …
Blog
1) Always be experimenting! Trying to squeeze out more performance out of your program? Don't be afraid to experiment! In practice what that means is you setup small, simple …
Blog
Many languages encourage programmers to use a getter/setter pattern. Like this: instance.set_foo(value) print instance.get_foo() Many years ago, as a junior programmer still …
Blog
As a programmer I believe less is more. Good code is small, simple and elegant and many times favorable to larger, noisier code that does the same. It's not just about aesthetics …
Blog
I just tracked down a nasty bug in my code to a gotcha with Python iterators. Consider the following code... class Numbers(list): def even(self): for val in self: if val % 2 == 0: …
Blog
If you like using a single getter/setter function for your properties, watch out if using None for the default. If you do that you won't be able to set your property to None! …
Blog
You're looking at a block of Python code. It's not immediately obvious what it does. It's sort of a mess and you realize it needs to be refactored. But how? What mental algorithm …
Blog
Do you find yourself occasionally wishing you could freeze a misbehaving program at an arbitrary point in time and then examining what was going on interactively? That's exactly …
Blog
"Premature optimization is the root of all evil" Today while programming I found myself thinking about the performance impact of various basic Python operations such as method …
Blog
Every now and then Liraz and I find ourselves chatting about how much we love Python, but more so the lessons we have learned from coding, and how to apply them to create …
Blog
Musings on Lisp by a routinely Pythonic programmer Last week I did some maintenance on various Python projects I haven't touched in years (literally), and I was surprised by how …