Python: Show all subclasses of a class đź”—
class.__subclasses__() returns a list of the direct subclasses of a given class: In [1]: class Base: pass ...: class Alpha(Base): pass In [2]: Bas [...]
a collection of dev rss feeds - blogroll
Posts
class.__subclasses__() returns a list of the direct subclasses of a given class: In [1]: class Base: pass ...: class Alpha(Base): pass In [2]: Bas [...]
Harlequin is a Terminal-based SQL IDE by Ted Conbeer. It is pretty popular, with over 2,500 GitHub Stars and counting. It looks like this: Harlequin i [...]
Here’s a small protection I added to a project a few years ago. I was considering it again since I saw a similar potential bug in a Django middleware. [...]
Copy-paste-tweaking library code feels like a dirty but inevitable programming practice. Often driven by deadlines or other constraints, it seems all [...]
Many terminals and text editors support what I’ll call “line number paths” of the form <filename>:<lineno>. Opening that path, whether by clicking or [...]
Django’s release notes are extensive and describe nearly all changes. Still, when upgrading between Django versions, you may encounter behaviour chang [...]
Say you have a commit SHA and want to know the first version it was released in. You can use this command: $ git describe --contains <sha> | sed -E 's [...]
I have just released an update to my book Boost Your Git DX, six months after its initial release. This update adds some extra content and has a bunch [...]
Django’s system check framework provides fantastic protection for configuration mishaps. It’s like a targeted linter that runs when you start Django c [...]
GeoDjango requires the GDAL and GEOS spatial libraries. On macOS, you can use Homebrew to install these, but they won’t be picked up by default since [...]