The following module allows you to create custom structseq objects from python. It requires a patch to structseq.c in order to correctly allocate the type object on the heap. I wasn't sure about the best way to allocate a type object on the heap, so this is my best effort. I'm going to follow up with a posting to python-dev to see what others think. This file will probably need to be updated to conform to python style standards. Feel free to include this in the standard Python distribution. I am willing to handle future updates/fixes for it. This is related to bug 624827 filed by Fred L. Drake to add similar functionality.