def METHOD_NAME(self, f):
    def p(templ, vars=self.__vars):
        print >> f, templ % vars
    if self.struct:
        p(template.dealloc_func, {"name" : self.__slots[TP_DEALLOC]})
    p(template.type_struct_start)
    for s in Slots[:-5]: # XXX
        val = self.__slots.get(s, s.default)
        ntabs = 4 - (4 + len(val)) / 8
        line = "        %s,%s/* %s */" % (val, "\t" * ntabs, s.name)
        print >> f, line
    p(template.type_struct_end)