“Python” articles

Watch out for Python's fcntl.flock on Solaris


I encountered a very aggravating problem in which it looked like Python's fcntl.flock was simply not working, for an unknown reason. I finally figured it out, and this is what I learned.

Eliminating some duplicates with the RecentSet class


In some situations, it may make sense to try to significantly reduce the number of duplicates in a collection, while ensuring that memory usage does not increase without bound. To help with this, I created a Python utility called a RecentSet, which serves as a sort of first-pass filter for significantly reducing the number of duplicates in a collection.

An Overrideable Alternative to the property Function in Python


This article describes an alternative to Python's built-in property function which allows the user to override, in derived classes, the methods used by this function.